function DisplayImage(picURL,picWidth,picHeight,picTitle){
var randomnumber=Math.floor(Math.random()*1201)
newWindow=window.open(picURL,'newWin'+randomnumber,'toolbar=no,scrollable=no,width='+picWidth+',height='+picHeight)
newWindow.document.write('<html><head><title>'+picTitle+'<\/title><\/head><body background="'+picURL+'"><\/body><\/html>')
newWindow.resizeBy(picWidth-newWindow.document.body.clientWidth,picHeight-newWindow.document.body.clientHeight)
newWindow.focus()
}

function DisplayMOV(vidURL,vidTitle,vidWidth,vidHeight){
var randomnumber=Math.floor(Math.random()*1201)
var winWidth = Number(vidWidth) + 30
var winHeight = Number(vidHeight) + 30
newWindow=window.open(vidURL,'newWin'+randomnumber,'toolbar=no,width='+winWidth+',height='+winHeight)
newWindow.document.write('<html><head><title>'+vidTitle+'<\/title><\/head><body bgcolor="#FFFFFF"><table height="100%" width="100%"><tr><td><center><OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" WIDTH="'+vidWidth+'" HEIGHT="'+vidHeight+'" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab"><PARAM name="SRC" VALUE="'+vidURL+'"><PARAM name="AUTOPLAY" VALUE="true"><PARAM name="CONTROLLER" VALUE="true"><EMBED SRC="'+vidURL+'" WIDTH="'+vidWidth+'" HEIGHT="'+vidHeight+'" AUTOPLAY="true" CONTROLLER="true" PLUGINSPAGE="http://www.apple.com/quicktime/download/"><\/EMBED><\/OBJECT><\/center><\/td><\/tr><\/table><\/body><\/html>')
newWindow.focus()
}

function DisplayASF(vidURL,vidTitle,vidWidth,vidHeight){
var randomnumber=Math.floor(Math.random()*1201)
var winWidth = Number(vidWidth) + 30
var winHeight = Number(vidHeight) + 30
newWindow=window.open(vidURL,'newWin'+randomnumber,'toolbar=no,width='+winWidth+',height='+winHeight)
newWindow.document.write('<html><head><title>'+vidTitle+'<\/title><\/head><body bgcolor="#FFFFFF"><table height="100%" width="100%"><tr><td><center><OBJECT ID="MediaPlayer1" width='+vidWidth+' height='+vidHeight+' classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject"><PARAM NAME="FileName" VALUE="'+vidURL+'"><PARAM NAME="animationatStart" VALUE="true"><PARAM NAME="transparentatStart" VALUE="true"><PARAM NAME="autoStart" VALUE="true"><PARAM NAME="showControls" VALUE="true"><EMBED type="application/x-mplayer2" pluginspage = "http://www.microsoft.com/Windows/MediaPlayer/" SRC="'+vidURL+'" name="MediaPlayer1" width='+vidWidth+' height='+vidHeight+' AutoStart=true><\/EMBED><\/OBJECT><\/center><\/td><\/tr><\/table><\/body><\/html>')
newWindow.focus()
}


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];}
}






var ua = navigator.userAgent
var ps = navigator.productSub
var dom = (document.getElementById)? 1:0
var ie4 = (document.all&&!dom)? 1:0
var ie5 = (document.all&&dom)? 1:0
var nn4 =(navigator.appName.toLowerCase() == "netscape" && parseInt(navigator.appVersion) == 4)
var nn6 = (dom&&!ie5)? 1:0
var sNav = (nn4||nn6||ie4||ie5)? 1:0
var cssFilters = ((ua.indexOf("MSIE 5.5")>=0||ua.indexOf("MSIE 6")>=0)&&ua.indexOf("Opera")<0)? 1:0
var Count=0,sbw=0,move=0,hs="",mx,my,scl,sct,ww,wh,obj,sl,st,ih,iw,vl,hl,sv,evlh,evlw,tbody
var HideTip = "eval(obj+sv+hl+';'+obj+sl+'=0;'+obj+st+'=-800')"
var doc_root = ((ie5&&ua.indexOf("Opera")<0||ie4)&&document.compatMode=="CSS1Compat")? "document.documentElement":"document.body"
var PX = (nn6)? "px" :"" 

if(sNav) {
	window.onresize = ReloadTip
	document.onmousemove = MoveTip
	if(nn4) document.captureEvents(Event.MOUSEMOVE) 
}	
if(nn4||nn6) {
	mx = "e.pageX"
	my = "e.pageY"
	scl = "window.pageXOffset"
	sct = "window.pageYOffset"	
	if(nn4) {
		obj = "document.infobox."
		sl = "left"
		st = "top"
		ih = "clip.height"
		iw = "clip.width"
		vl = "'show'"
		hl = "'hide'"
		sv = "visibility="
	}
	else obj = "document.getElementById('infobox')."
} 
if(ie4||ie5) {
	obj = "infobox."
	mx = "event.x"
	my = "event.y"
	scl = "eval(doc_root).scrollLeft"
	sct = "eval(doc_root).scrollTop"
	if(ie5) {
		mx = mx+"+"+scl 
		my = my+"+"+sct
	}
}
if(ie4||dom){
	sl = "style.left"
	st = "style.top"
	ih = "offsetHeight"
	iw = "offsetWidth"
	vl = "'visible'"
	hl = "'hidden'"
	sv = "style.visibility="
}
if(ie4||ie5||ps>=20020823) {
	ww = "eval(doc_root).clientWidth"
	wh = "eval(doc_root).clientHeight"
}	 
else { 
	ww = "window.innerWidth"
	wh = "window.innerHeight"
	evlh = eval(wh)
	evlw = eval(ww)
	sbw=15
}	



function stm(t) {
  if(sNav) {
		var txt=t
		if(nn4) {
			with(eval(obj+"document")) {
				open()
				write(txt)
				close()
			}
		}
		else eval(obj+"innerHTML=txt")
		Count=0
		move=1
 	 }
}

function MoveTip(e) {
	if(move) {
		var X,Y,MouseX = eval(mx),MouseY = eval(my)
		X=MouseX
                Y=MouseY
		if(X<0) X=0
		eval(obj+sl+"=X+PX;"+obj+st+"=Y+PX")
		ViewTip()
	}
}

function ViewTip() {
  	Count++
	if(Count == 1) {
 		eval(obj+sv+vl)
  	}
}


function ReloadTip() {
	 if(nn4&&(evlw!=eval(ww)||evlh!=eval(wh))) location.reload()
}

function htm() {
	if(sNav) {
	move=0;
	eval(obj+sv+hl)
        }
}
