				
var ns4=(document.layers)? true:false;
var ie4=(document.all)? true:false;
var ns6=(document.getElementById && !document.all)? true:false;

function changeBg(layerName,swapColor) {
 if (ns4) { document.layers[layerName].bgColor = swapColor; }
 if (ie4) { document.all[layerName].style.backgroundColor = swapColor; }
 if (ns6) { document.getElementById(layerName).style.backgroundColor = swapColor; }
}

function showSquare2(x){
	if (ns4) { document.layers[x].visibility = 'show'; }
	if (ie4) { document.all[x].style.visibility = 'visible'; }
	if (ns6) { document.getElementById(x).style.visibility = 'visible'; }
}

function hideSquare2(x){
	if (ns4) { document.layers[x].visibility = 'hide'; }
	if (ie4) { document.all[x].style.visibility = 'hidden'; }
	if (ns6) { document.getElementById(x).style.visibility = 'hidden'; }
}

function selectIndex(x,i){
	if (ns4) { document.layers[x].selectedIndex   = i; }
	if (ie4) { document.all[x].selectedIndex   = i; }
	if (ns6) { document.getElementById(x).selectedIndex   = i; }
}

function selectDisabled(x){
	if (ns4) { document.layers[x].disabled='disabled'; }
	if (ie4) { document.all[x].disabled='disabled'; }
	if (ns6) { document.getElementById(x).disabled='disabled'; }
}
function selectEnabled(x){
	if (ns4) { document.layers[x].disabled=''; }
	if (ie4) { document.all[x].disabled=''; }
	if (ns6) { document.getElementById(x).disabled=''; }

}
function setValue(x,v){
	if (ns4) { document.layers[x].value=v; }
	if (ie4) { document.all[x].value=v; }
	if (ns6) { document.getElementById(x).value = v; }
}
	
var handle_PUW = null;

function CenterWindow(url, w, h) 
{
   //if (document.all)var xMax = screen.width, yMax = screen.height;
    //else
    //{
    //    if (document.layers) var xMax = window.outerWidth, yMax = window.outerHeight;
    //    else var xMax = 640, yMax=480;
   // }
   //if (w>xMax) w = xMax * .9;
   //if (h>yMax) h = yMax * .9;
   //var l = (xMax - w)/2, t = (yMax-h)/2;

  // handle_PUW = window.open('','PartnerW','left=1000,top=1000,width=2,height=2')
   //if (!handle_PUW.closed) handle_PUW.close();   
   if (handle_PUW && handle_PUW.open && !handle_PUW.closed) handle_PUW.close(); 
   handle_PUW = window.open(url,'PartnerW','screenX=0,left=0,screenY=0,top=0,toolbar=1,location=0,directories=0,status=1, menubar=0,scrollbars=1,resizable=1,fullscreen=0,width='+w+',height='+h);
}

var handle_PUHH = null;

function CenterHelp(url, w, h) 
{

   if (handle_PUHH!=null && handle_PUHH.open && !handle_PUHH.closed) 
   {
	   handle_PUHH.close(); 
	   handle_PUHH = null;
   }
   
   try
	{
  	 handle_PUHH = window.open(url,'Partner','screenX=0,left=0,screenY=0,top=0,toolbar=0,location=0,directories=0,status=0, menubar=0,scrollbars=1,resizable=1,fullscreen=0,width='+w+',height='+h);

	}
	catch(x)
	{
	}
	
	if(handle_PUHH==null)
	{
		alert("Please allow pop-ups for this assessment form ...") 

	}
	else
	{
	handle_PUHH.focus();
	}

   //handle_PUH.moveTo(0,0);
   //handle_PUH.resizeTo(w,h);
  // 

}
