if (document.all) { if (top != self) top.document.title = document.title; }

// Generic JavaScript Function: Start
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

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_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_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.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];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}

if(window.event + "" == "undefined") event = null;
function HM_f_PopUp(){return false};
function HM_f_PopDown(){return false};
popUp = HM_f_PopUp;
popDown = HM_f_PopDown;

if (document.layers)
{
	NE = true;
	IE = false;
} else if (document.all)
{
	NE = false;
	IE = true;
} else {
	NE = true;
	IE = false;	
}

function popupWindow(url,width,height)
{
  if (navigator.appName != "Netscape")
  {
    x = top.screenLeft + 20;
    y = top.screenTop - 80;
  }
  else
  {
    x = window.screenX + 20;
    y = window.screenY;
  }

  popupWin = window.open(url,'remote','directories=no,location=no,menubar=no,resizable=no,scrollbars=yes,width='+width+',height='+height+',top='+y+',screenY='+y+',left='+x+',screenX='+x);
}
//Function center popup
function openBrWindow(mypage,myname,w,h,status,location,menubar,resizable,scroll)
{
	  var winl = (screen.width-w)/2;
	  var wint = 0;
	  var settings  ='height='+h+',';
		  settings +='width='+w+',';
		  settings +='top='+wint+',';
		  settings +='left='+winl+',';
		  settings +='status='+status+',';
		  settings +='location='+location+',';
		  settings +='menubar='+menubar+',';
		  settings +='resizable='+resizable+',';
		  settings +='scrollbars='+scroll;
	  win=window.open(mypage,myname,settings);
	  if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
	  return false ;	  
}
// Generic JavaScript Function: End
function getDocFilename(){
pageURL = document.URL;
pageFName = "";
if ( pageURL.indexOf("http://") > -1 ){
	pageFName = pageURL.substr(pageURL.lastIndexOf("/")+1,pageURL.length);
}else if ( pageURL.indexOf("file://") > -1 ){
    if (document.all) {
    	pageFName = pageURL.substr(pageURL.lastIndexOf("\\")+1,pageURL.length);
	} else {
	    pageFName = pageURL.substr(pageURL.lastIndexOf("/")+1,pageURL.length);
	}
}
return pageFName;
}

function init() {
    var urlstr = getDocFilename();
	pObj = MM_findObj("bannerImg",top.topa.document);
	if ((urlstr.indexOf("ab_") > -1 ) || (urlstr.indexOf("pro_") > -1 ) || (urlstr.indexOf("ca_") > -1 ) || (urlstr.indexOf("com_") > -1 ) || (urlstr.indexOf("content") > -1 )) {
		//top.topa.location = "top1.htm";
		//top.swapBanner(1);
		if (pObj != null) {
		    pObj.src = "images/header/promo1.gif";
		}
	} else if (urlstr.indexOf("ag_") > -1 ) {
		//top.topa.location = "top2.htm";  
		//top.swapBanner(2);		
		if (pObj != null) {
		    pObj.src = "images/header/promo1.gif";
		}
	} else if ((urlstr.indexOf("cus_") > -1 ) || (urlstr.indexOf("se_") > -1 )) {
		//top.topa.location = "top3.htm";  
		//top.swapBanner(3);
		if (pObj != null) {
		    pObj.src = "images/header/promo3.gif";
		}
	} else {
		//top.topa.location = "top1.htm";
		//top.swapBanner(1);		
		if (pObj != null) {
		    pObj.src = "images/header/promo1.gif";
		}
	}
}

function ViewVideo(filename) {
	width=250;
	height=250;
	vitriTop=(screen.availHeight-width)/2;
	vitriLeft=(screen.availWidth-height)/2;
	w=window.open(filename,'','top=' + vitriTop + ', left=' + vitriLeft + ', width=' + width + ', height=' + height);
	w.focus();
}