function MM_findObj(n, d) { //v4.01
var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function TellAFriend(lang)
{
	var leftPos = screen.availWidth/2-(400/2);
	var topPos  = screen.availHeight/2-(470/2);
	var tellWin = window.open ("tellafriend-" + lang + ".html", "TellAFriend", 'left=' + leftPos + ', top=' + topPos + ', width=400, height=470, location=no, menubar=no, status=no, toolbar=no, scrollbars=no, resizable=no');
}

function OpenCenterWindow(sUrl,sName,iHeight,iWidth)
{
	var top		= (screen.height-iHeight)/2;
	var left	= (screen.width-iWidth)/2;
	window.open(sUrl,sName,"'status=yes,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=no,"+"width="+iWidth+",height="+iHeight+",top="+top+",left="+left+"'");
}

function RightClose(id)
{
	tbl = MM_findObj(id);
	if (tbl)
	{
		var display = tbl.style.display ? '' : 'none';
		tbl.style.display = display;
	}
}

function clickButton(e, buttonid){ 
      var bt = document.getElementById(buttonid); 
      if (typeof bt == 'object'){ 
            if(navigator.appName.indexOf("Netscape")>(-1)){ 
                  if (e.keyCode == 13){ 
                        bt.click(); 
                        return false; 
                  } 
            } 
            if (navigator.appName.indexOf("Microsoft Internet Explorer")>(-1)){ 
                  if (event.keyCode == 13){ 
                        bt.click(); 
                        return false; 
                  } 
            } 
      } 
} 


function SetPrintVersion(isPrint)
{
	if (isPrint)
	{
		display = "none";
		printHeader = "inline-table";
		if (window.navigator.userAgent.toLowerCase().indexOf("msie") != -1)
		{
			printHeader = "block";
		}
	}
	else
	{
		printHeader = "none";
		display = "table-cell";
		if (window.navigator.userAgent.toLowerCase().indexOf("msie") != -1)
		{
			display = "block";
		}
	}

	var topSection = MM_findObj("tdTop");
	if (topSection) 
	{
		topSection.style.display = display;
	}
	var bottomSection = MM_findObj("tdBottom");
	if (bottomSection) 
	{
		bottomSection.style.display = display;
	}
	var leftSection = MM_findObj("tdleft");
	if (leftSection) 
	{
		leftSection.style.display = display;
	}
	var rightSection = MM_findObj("tdright");
	if (rightSection) 
	{
		rightSection.style.display = display;
	}
	var printHeaderSection = MM_findObj("tdPrintHeader");
	if (printHeaderSection) 
	{
		printHeaderSection.style.display = printHeader;
	}
}


