/*This A.P.I. (Alberto's Perfect Interface) for UPN.Com*/
/*Global var start*/
this.author = "Alberto F. Araya ";
this.UpDated = "05/01/2002@23:00pm";
this.version = "UPN.Com A.P.I. ver 4.1 ";
this.whatIs = version+'and updated on '+ UpDated;
document.write('<meta name="Author" CONTENT='+this.author+'>\n <meta name="Creator" CONTENT='+this.author+this.whatIs+'>\n');
currOpen = "";
var all_loaded=false;/*for dhtml menu*/
/*Global var end*/
function checkBrowser()
{
	this.ie4=false;
	this.ie5=false;
	this.ie6=false
	this.ns4=false;
	this.ns6=false;
	this.mac=false;	
	this.pc=false;
	this.aol=false;
	this.dom=document.getElementById?this.dom=true:this.dom=false;
	this.bname=navigator.appName;
	this.ver=navigator.appVersion;
	this.int_ver=parseInt(this.ver);
	this.navUser=navigator.userAgent;
	this.navMime=navigator.mimeTypes;
	this.navPlugs=navigator.plugins;
	this.bname.indexOf("Netscape")>=0&&this.int_ver==4?(this.ns4=true):(this.ns4=false);
	this.navUser.toLowerCase().indexOf('aol')!=-1?(this.aol=true):(this.aol=false);
	this.ver.indexOf('Mac')!=-1?(this.mac=true):(this.pc=true);
	this.navUser.indexOf('MSIE 4')>0?(this.ie4=true):(this.ie4=false);
	this.navUser.indexOf('MSIE 5')>0?(this.ie5=true):(this.ie5=false);
	this.navUser.indexOf('MSIE 6')>0?(this.ie6=true):(this.ie6=false);
	this.navUser.indexOf("Netscape6")>0?(this.ns6=true):(this.ns6=false);
this.upn=(this.ie5||this.ie4||this.ns4||this.ns6||this.ie6);
this.UPNDOM=(this.ie5||this.ns6||this.ie6);
this.UPNNDOM=(this.ie4||this.ns4);
return this;
}
upn=new checkBrowser();

function init()
{
if (upn.ns4)
{
for (var i=0;i<document.layers.length;i++)
{
var thisObj = document.layers[i];
thisObj.captureEvents(Event.MOUSEOUT);
thisObj.onmouseout = hideit;
}
}
}
function hideit (e)
{
var layname = e.target.name;
var tar = e.target+"";
if(upn.ie5||upn.ie4){if(layname.indexOf('search')<0)return;}
if (tar.indexOf('navigation')>=0){hide(layname);}
else {routeEvent(e);}
}
function getObjStyle(objTree)
{
var objStrArr = objTree.split('.');
var objStr = objStrArr[objStrArr.length-1];
var strS = "";
if (upn.ns4)
{
strS += "document.layers[objStrArr[0]]";
if (objStrArr.length > 1)
{
	for(var i=1; i<objStrArr.length; i++)
{strS+=".document.layers[objStrArr["+i+"]]";}
}
return(eval(strS));
}
else if(upn.ie4){return(document.all[objStr].style);}
}
function show(strObj)
{
var thisObj = getObjStyle(strObj);
if(all_loaded==false){return;}
if(currOpen != ""){hide(currOpen);}
if(upn.ie4){thisObj.visibility = "visible";}
if(upn.ns4){thisObj.visibility = "show";}
if(upn.UPNDOM){document.getElementById(strObj).style.visibility = "visible";}
currOpen=strObj;
}
function hide(strObj)
{
var thisObj = getObjStyle(strObj);
if (upn.ie4){s
var thisDoc = document.all[strObj];
if (!(thisDoc.contains(window.event.toElement)))
{thisObj.visibility="hidden";}}
if (upn.ns4){thisObj.visibility = "hide";}
if(upn.UPNDOM){document.getElementById(strObj).style.visibility = "hidden";}
currOpen="";
}
if((upn.mac)&&(upn.ns6)){plugin=0;}
else if(upn.navMime&&upn.navMime["application/x-shockwave-flash"]&&upn.navMime["application/x-shockwave-flash"].enabledPlugin){if (upn.navPlugs &&upn.navPlugs["Shockwave Flash"]){flashplugin = 1;}}
else if(upn.navUser &&upn.navUser.indexOf("MSIE")>=0&&(upn.navUser.indexOf("Windows 95")>=0||upn.navUser.indexOf("Windows 98")>=0||upn.navUser.indexOf("Windows NT")>=0)){
document.write('<SCRIPT LANGUAGE=VBScript\> \n on error resume next \n\n flashplugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3")))\n');
document.write('if ( flashplugin <= 0 ) then flashplugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4")))\n');
document.write('if ( flashplugin <= 0 ) then flashplugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5")))\n');
document.write('if ( flashplugin <= 0 ) then flashplugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6")))\n </SCRIPT\> \n');}
/*Flash display*/
function EmbedFlash(width,height,FlashSrc,ImageSrc,SendUrl,Alt_Id_Name,MapName,color,fVer,autostart)
{
var AFT,AIT;
FlashCode='';
if(!fVer){fVer=3;}
if(!width || !height){width=20;height=20;}
if(!autostart){autostart=true;}
if(!Alt_Id_Name){file_ID="CBS";}else{file_ID=Alt_Id_Name;}
if(!color){color="";}
if(flashplugin)
{
FlashCode=('<OBJECT classid="'+this.ClassID+'" codebase="'+this.FCodebase+'" ID="'+file_ID+'" WIDTH="'+width+'" HEIGHT="'+height+'">\n');
FlashCode+=('<PARAM NAME=movie VALUE="'+FlashSrc+'"> <PARAM NAME="quality" VALUE="high">\n<PARAM NAME="menu" VALUE="false"> \n');
FlashCode+=('<PARAM NAME="AUTOSTART" VALUE="'+autostart+'">\n<PARAM NAME="bgcolor" VALUE="'+color+'">\n');
FlashCode+=('<EMBED menu=false swLiveConnect="FALSE" src="'+FlashSrc+'" quality=high width='+width+' height='+height+' type="application/x-shockwave-flash" pluginspage="'+this.FDownload+'" autostart="'+autostart+'" high bgcolor="'+color+'"></EMBED>\n</OBJECT>');}
else if((!flashplugin)&&(SendUrl==this.FDownload))
{FlashCode+=('<a href="'+SendUrl+'" target="_blank"><img src="'+ImageSrc+'" alt="'+file_ID+'" border="'+0+'" width="'+width+'" height="'+height+'"></a>');}
else if((!flashplugin)&&(!SendUrl)&&(!MapName))
{FlashCode=('<img src="'+ImageSrc+'" alt="'+file_ID+'" border="'+0+'" width="'+width+'" height="'+height+'">');}
else if((!flashplugin)&&(SendUrl!=this.FDownload)&&(!MapName))
{FlashCode+=('<a href="'+SendUrl+'"><img src="'+ImageSrc+'" alt="'+file_ID+'" border="'+0+'" width="'+width+'" height="'+height+'"></a>');}
else if((!flashplugin)&&(MapName))
{FlashCode+=('<img src="'+ImageSrc+'" alt="'+file_ID+'" border="'+0+'" width="'+width+'" height="'+height+'" usemap="'+MapName+'">');}
document.write(FlashCode);}
/*Flip can be used with or with out layers*/
function flip(){if (document.images){var num_arg = arguments.length-1;var layername = "";var thisObj;if ((arguments.length%2) != 0){layername = arguments[num_arg];}for (var i=0; i<num_arg; i){var j = i+1;var imgname = arguments[i];var imgsrc = arguments[j];if (upn.ns4 && layername){thisObj = getObjStyle(layername);thisObj.document.images[imgname].src = eval(imgsrc+'.src');}else{document.images[imgname].src = eval(imgsrc+'.src');}i+=2;}}}
function openWin(url,w,h,winName,scroll,resz)
{if(winName==''){winName='CbsWindow';}if(scroll==''){scroll='yes';}if(resz==''){resz='0';}/*edited by AFA popwin = */ window.open(url,winName,"height="+h+",width="+w+",status=0,scrollbars="+scroll+",resizable="+resz +",location=0,menubar=0");}
if (upn.ns4){winw = window.innerWidth;winh = window.innerHeight;window.onResize = reloadwin;}
function reloadwin(){if ((winw != window.innerWidth) || (winh != window.innerHeight)){var holder=location.href;holder=holder.split("#");location.href=holder[0];}}
function moveLayers(layer,PosX,PosY)
{
//if(!layer||!PosX||PosY){return;}
var Mleft=PosY+"px";
var Mtop=PosX+"px";
if((upn.pc)||(upn.mac))
{
if(upn.ns4){Mleft=parseInt(Mleft);Mtop=parseInt(Mtop)+(0);eval("document.layers['"+layer+"'].left="+Mleft+";");eval("document.layers['"+layer+"'].top="+Mtop+";");}
else if(upn.ie4){Mleft= parseInt(Mleft);Mtop= parseInt(Mtop)+(0);eval("document.all['"+layer+"'].style.left="+Mleft+";");eval("document.all['"+layer+"'].style.top="+Mtop+";");}
else{Mleft= parseInt(Mleft);Mtop= parseInt(Mtop)+(0);document.getElementById(layer).style.left=Mleft;document.getElementById(layer).style.top=Mtop;}
}}