				
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; }
}
function getControl(x){
	if (ns4) { return document.layers[x]; }
	if (ie4) { return document.all[x]; }
	if (ns6) { return document.getElementById(x); }
}

function switchImage(which, where) {
	document.getElementById(where).src = which;
}
	
var handle_PUW = null;

function CenterWindow(url, w, h) 
{
   if (handle_PUW && handle_PUW.open && !handle_PUW.closed) handle_PUW.close(); 
	try
	{
		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);
	}
	catch(x)
	{
	}
	if(handle_PUW==null) 
	{
		alert("Please allow pop-ups ...") 
	}
	else
	{
		handle_PUW.focus();
	}
}

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 ...")  
	}
	else
	{
	handle_PUHH.focus();
	}
   //handle_PUH.moveTo(0,0);
   //handle_PUH.resizeTo(w,h);
}

var handle_PUP = null;

function OpenPicture(url) 
{
   if (handle_PUP && handle_PUP.open && !handle_PUP.closed) handle_PUP.close(); 
   handle_PUP = window.open(url,'PartnerP','screenX=0,left=0,screenY=0,top=0,toolbar=0,location=0,directories=0,status=1, menubar=0,scrollbars=0,resizable=1,fullscreen=0,width=1,height=1');
   handle_PUP.focus();
}