

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

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 MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

// bookmark webpage
function bookmarksite(title, url){
	if (document.all)
	window.external.AddFavorite(url, title);
	else if (window.sidebar)
	window.sidebar.addPanel(title, url, "")
}

function popWindowNoPostBack(w,h,url) {
	var myWin = window.open(url,'New_Window','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=Yes,resizable=no,copyhistory=no,width='+w+',height='+h);
	//myWin.moveTo(screen.availWidth/2-(w/2),screen.availHeight/2-(h/2));
	
	return false;
}

function openWindowNoPostBack(url, name) {
	var myWin = window.open(url,name,'toolbar=yes,location=yes,directories=no,status=yes,menubar=yes,scrollbars=Yes,resizable=yes,copyhistory=no');
	
	return false;
}

function popCenterWindow(w,h,url) {
	var myWin = window.open(url,'New_Window','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=Yes,resizable=no,copyhistory=no,width='+w+',height='+h);
	myWin.moveTo(screen.availWidth/2-(w/2),screen.availHeight/2-(h/2));
}

function popVideoWindow(w,h,url) {
	var myWin = window.open(url,'New_Window','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+w+',height='+h);
	myWin.moveTo(screen.availWidth/2-(w/2),screen.availHeight/2-(h/2));
}

function loadQuicktimeVideo(w, h, url)
{
	document.write('<object classid=\'clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B\' width="' + w + '" height="' + h + '" codebase=\'http://www.apple.com/qtactivex/qtplugin.cab\'>');
	document.write('<param name=\'src\' value="' + url + '">');	
	document.write('<param name=\'autoplay\' value="true">');
	document.write('<param name=\'controller\' value="true">');
	document.write('<param name=\'loop\' value="false">');
	document.write('<embed src="' + url + '" width="' + w + '" height="' + h + '" autoplay="true" controller="true" loop="false" pluginspage=\'http://www.apple.com/quicktime/download/\'></embed>');
	document.write('</object>');
}

function loadWindowsVideo(w, h, url)
{
	document.write('<object id=\'mediaPlayer\' width="' + w + '" height="' + h + '" classid=\'CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95\' codebase=\'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701\' standby=\'Loading Microsoft Windows Media Player components...\' type=\'application/x-oleobject\'>');
	document.write('<param name=\'fileName\' value="' + url + '">');
	document.write('<param name=\'animationatStart\' value=\'true\'>');
	document.write('<param name=\'transparentatStart\' value=\'true\'>');
	document.write('<param name=\'autoStart\' value="true">');
	document.write('<param name=\'showControls\' value="true">');
	document.write('<param name=\'loop\' value="false">');
	document.write('<embed type=\'application/x-mplayer2\' pluginspage=\'http://microsoft.com/windows/mediaplayer/en/download/\' id=\'mediaPlayer\' name=\'mediaPlayer\' displaysize=\'4\' autosize=\'-1\' bgcolor=\'darkblue\' showcontrols="true" showtracker=\'-1\' showdisplay=\'0\' showstatusbar=\'-1\' videoborder3d=\'-1\' width="' + w + '" height="' + h + '" src="' + url + '" autostart="true" designtimesp=\'5311\' loop="false"></embed>');
	document.write('</object>');
}

function loadFlashMovie(w, h, url, name)
{
	document.write('<object classid=\'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\' codebase=\'http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\' width="' + w + '" height="' + h + '" id=\'net_banners\' align=\'middle\'>');
	document.write('<param name=\'allowScriptAccess\' value=\'sameDomain\' />');
	document.write('<param name=\'movie\' value="' + url + '" />');
	document.write('<param name=\'quality\' value=\'high\' />');
	document.write('<param name=\'bgcolor\' value=\'#ffffff\' />');
	document.write('<embed src="' + url + '" quality=\'high\' bgcolor=\'#ffffff\' width="' + w + '" height="' + h + '" name="' + name + '" align=\'middle\' allowscriptaccess=\'sameDomain\' type=\'application/x-shockwave-flash\' pluginspage=\'http://www.macromedia.com/go/getflashplayer\' />');
	document.write('</object>');
}
