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-(380/2);
	var topPos  = screen.availHeight/2-(380/2);
	var tellWin = window.open ("tellafriend-" + lang + ".html", "TellAFriend", 'left=' + leftPos + ', top=' + topPos + ', width=380, height=380, location=no, menubar=no, status=no, toolbar=no, scrollbars=no, resizable=no');
}

function ToggleCheckBoxes(aspCheckBoxID, checked)
{
	parentContainer = document.forms[0];
    re = new RegExp(':' + aspCheckBoxID + ':[0-9]{1,}');  //generated checkboxlist control name starts with a colon and ends with :number

    for(i = 0; i < parentContainer.elements.length; i++)
    {
        elm = parentContainer.elements[i];
        if (elm.type == 'checkbox')
        {
            if (re.test(elm.name))
            {
                elm.checked = checked;
            }
        }
    }	
}


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 loadflash(id,theurl,width,height) 
{
	MM_findObj('flashholder').innerHTML ='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width='+ width +'" height="'+ height +'"><param name="movie" value="'+ theurl +'" \/><param name="quality" value="high" \/><param name="wmode" value="transparent" \/><embed src="'+ theurl + '" width="'+ width + '" height="'+ height + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" \/><\/embed><\/object>';
}

flashfix = function() {
	theObjects = document.getElementsByTagName("object");
	for (var i = 0; i < theObjects.length; i++) {
		theObjects[i].outerHTML = theObjects[i].outerHTML;
	}
} 
if (window.attachEvent)
	window.attachEvent("onload", flashfix)
else
	window.onload=flashfix;