function showHelp(obj){

	   var helpWin=window.open(obj.href,'help','scrollbars=yes,width=500,height='+screen.height+',top=0,screenY=0,left='+(screen.width-500)+',screenX='+(screen.width-500)+',toolbar=no,resizable=yes');
	   return false;

   }

function showWizard(obj){

	   var wizWin=window.open(obj.href,'wizard','scrollbars=yes,width=700,height=650,top=0,screenY=0,left='+(screen.width-500)+',screenX='+(screen.width-500)+',toolbar=no,resizable=yes');
	   return false;

   }

   function showWait(){

	   var box=document.getElementById("waitBox");
	   box.style.left=(screen.width/2-125)+"px";
	   box.style.visibility="visible";
   }

   function showInfo(e,tagID){
	   if(document.all){ 
		   e=window.event;
		   var obj=e.srcElement;
	   }else{
		   var obj=e.target;
	   }

	   var el=document.getElementById(tagID);

	   el.style.top="150px";
	   el.style.left=((document.documentElement.offsetWidth/2)-(el.offsetWidth/2))+"px";
	   
	   setTimeout("document.getElementById('"+tagID+"').style.display='block';",250);
   



   }

function passwordPopup(mkt) { 
  var theWin; 	 


  theWin = window.open('LOGIN/p_password_reset.php?mkt='+mkt,'Password', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollsbars=no, resizable=no, copyhistory=yes, width=500, height=400'); 
  
  theWin.focus()
    
    return false;
}


var http_request = false;

    function makeRequest() {
	var i=makeRequest.arguments[0];
	var t=makeRequest.arguments[1];
	var fcn=makeRequest.arguments[2];
	if(typeof(i)!='undefined' && typeof(t)!='undefined' && typeof(fcn)!='undefined'){

        	http_request = false;

	        if (window.XMLHttpRequest) { // Mozilla, Safari,...
        	    http_request = new XMLHttpRequest();
	            if (http_request.overrideMimeType) {
        	        http_request.overrideMimeType('text/xml');
                	// See note below about this line
	            }
        	} else if (window.ActiveXObject) { // IE
	            try {
        	        http_request = new ActiveXObject("Msxml2.XMLHTTP");
	            } catch (e) {
        	        try {
                	    http_request = new ActiveXObject("Microsoft.XMLHTTP");
	                } catch (e) {}
        	    }
	        }

	        if (!http_request) {            
        	    return false;
	        }

	//construct extra query string
	var qstr="";
	var gott=0,goti=0;
	for(var ictr=3;ictr<makeRequest.arguments.length;ictr++){
	if((ictr%2)==0){//this is even so it's a t value
		if(goti>0){
			qstr+="&t"+goti+"="+makeRequest.arguments[ictr];
		}else{
			qstr+="&t"+ictr+"="+makeRequest.arguments[ictr];
		}
		gott=ictr;
	}else{		
		if(gott>0){
			qstr+="&i"+gott+"="+makeRequest.arguments[ictr];
		}
		else{
			qstr+="&i"+ictr+"="+makeRequest.arguments[ictr];
		}
		goti=ictr;
	}
	if(gott>0 && goti>0){
		gott=0;
		goti=0;
	}

	}

		//alert("SUPPORT/p_support_request.php?i="+i+"&t="+t+qstr);
        	http_request.onreadystatechange = fcn;
	        http_request.open('GET', "SUPPORT/p_support_request.php?i="+i+"&t="+t+qstr, true);
        	http_request.send(null);
		return true;
	}

    }

   
function returnDiv(id) {
	if (document.all) // IE
	{
		var div = document.all(id).style;
	}
	else if (document.layers) // NS4
	{
		var div = document.layers[id];
	}
	else if (document.getElementById) // NS6
	{
		var div = document.getElementById(id).style;
	}
	return div;
}

function showLayer(id) 
{
	if(openLayer != "")
	{
		hideLayer(openLayer); 
		openLayer = ""; 
	}
	var div = returnDiv(id);
	div.visibility = "visible";
	openLayer = id;
}

function hideLayer(id) 
{
	var div = returnDiv(id);
	div.visibility = "hidden";
}
var openLayer = "";


function enable_tr_effect(){
	
	var divs=document.getElementsByTagName("div");

	var len=divs.length;

	var tbl=null;

	var trs=null;

	for(i=0;i<len;i++){

		if(divs[i].className=="data_table_layout"){			

			tbl=divs[i].getElementsByTagName("table");			
			if(tbl.length>0){

				for(j=0;j<tbl.length;j++){

					trs=tbl[j].getElementsByTagName("tr");

					for(k=0;k<trs.length;k++){
						
						trs[k].className="normal";

						if(navigator.userAgent.match(/Gecko/)){

							trs[k].addEventListener("mouseover",function(){this.className="hover";},true);

							trs[k].addEventListener("mouseout",function(){this.className="normal";},true);

						}else{
				
							trs[k].onmouseover=function(){this.className="hover";}

							trs[k].onmouseout=function(){this.className="normal";}
						}
					}
				}
			}
		}
	}
}

