function getposOffset(overlay, offsettype){
var totaloffset=(offsettype=="left")? overlay.offsetLeft : overlay.offsetTop;
var parentEl=overlay.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
if (offsettype=="top")
{
totaloffset=totaloffset+25;
}
if (offsettype=="left")
{
totaloffset=totaloffset-250;
}
return totaloffset;
}

function overlay(curobj, subobj){
	if (document.getElementById)
	{
		if(document.getElementById(subobj).style.display == "none")
		{
			var subobj=document.getElementById(subobj);
			//subobj.style.left=getposOffset(curobj, "left")+"px"
			//subobj.style.top=getposOffset(curobj, "top")+"px"
			subobj.style.display="block";
		}
		else if(document.getElementById(subobj).style.display == "block") 
		{
			document.getElementById(subobj).style.display="none";
		}
	}
}

function overlayclose(subobj){
	
}


function ResizeContentDiv() {


var LeftContentHeight = 0;
var RightContentHeight = 0;
var CenterContentHeight =0;

if (document.getElementById('Column_1')) {

var LeftContent = document.getElementById('Column_1');
LeftContentHeight = LeftContent.offsetHeight;
}

if (document.getElementById('Column_2')) {

var CenterContent = document.getElementById('Column_2');
CenterContentHeight = CenterContent.offsetHeight;
}

//if (document.getElementById('Column_3')) {
//var RightContent = document.getElementById('Column_3');
//RightContentHeight = RightContent.offsetHeight;
//}



var maxHeight = Math.max(LeftContentHeight,RightContentHeight,CenterContentHeight);

if (document.getElementById('Column_1')) {

LeftContent.style.height = maxHeight + "px";
}
if (document.getElementById('Column_2')) {
CenterContent.style.height = maxHeight + "px";
}
//if (document.getElementById('Column_3')) {
//RightContent.style.height = maxHeight + "px";
//}

}

function noenter() {
  return !(window.event && window.event.keyCode == 13); }

      var cssmenuids=["cssmenu1"]
      var csssubmenuoffset=0 

      function createcssmenu2(){
      for (var i=0; i<cssmenuids.length; i++){
        var ultags=document.getElementById(cssmenuids[i]).getElementsByTagName("ul")      
          for (var t=0; t<ultags.length; t++){
			  ultags[t].style.top=ultags[t].parentNode.offsetHeight+csssubmenuoffset+"px"
			  //added to center from parent item with fluid width
              ultags[t].style.left=(ultags[t].parentNode.offsetWidth-117)/2+"px"
			  
          	
    	      ultags[t].parentNode.onmouseover=function(){
					      this.style.zIndex=100
    	                  this.getElementsByTagName("ul")[0].style.visibility="visible"
					      this.getElementsByTagName("ul")[0].style.zIndex=0
					      //closeTab();	
    	      }
    	      ultags[t].parentNode.onmouseout=function(){
					      this.style.zIndex=0
					      this.getElementsByTagName("ul")[0].style.visibility="hidden"
					      this.getElementsByTagName("ul")[0].style.zIndex=100
    	      }      
          }
        }
      }

      if (window.addEventListener)
      window.addEventListener("load", createcssmenu2, false)
      else if (window.attachEvent)
      window.attachEvent("onload", createcssmenu2)   
      
var popupWin
function openNewWindow(wfile,wtitle,wwidth,wheight){
	popupWin = window.open(wfile,wtitle,"toolbar=no,leftmargin=0,topmargin=0,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=" + wwidth + ",height=" + wheight);
	popupWin.focus();

}

function closeWindow(){
	if (window.opener){
		window.opener.focus();
	}
window.close();
}


function b_refer(){
	window.history.back ();
}

function closeTab()	
{
jQuery('#miscLinks > ul').tabs({ selected: null, fx: { height: 'show' }});
}

function showFlashSection(section) {
if (document.getElementById) {
calleFlashMovie = document.getElementById("pulltabswf");
calleFlashMovie.showFlashSection(section);
}
}

function redirect(url){
    window.location = url;
}

