var imgheight
document.ns = navigator.appName == "Netscape"
window.screen.width>800 ? imgheight=100:imgheight=100
 function myload()
{
if (navigator.appName == "Netscape")
{document.dangdang.pageY=pageYOffset+window.innerHeight-imgheight;
document.dangdang.pageX=+window.innerWidth-120;
mymove();
}
else
{
dangdang.style.top=document.body.scrollTop+document.body.offsetHeight-imgheight;
dangdang.style.left=document.body.offsetWidth-120;
mymove();
}
}
 function mymove()
 {
 if(document.ns)
 {
 document.dangdang.top=pageYOffset+window.innerHeight-imgheight;
 document.dangdang.left=pageXOffset+window.innerWidth-120;
 setTimeout("mymove();",50)
 }
 else
 {
 dangdang.style.top=document.body.scrollTop+document.body.offsetHeight-imgheight;
 dangdang.style.left=document.body.scrollLeft+document.body.offsetWidth-120;
 setTimeout("mymove();",50)
 }
 }

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 GetCookie(sName)
{  
	var aCookie = document.cookie.split(";");
	for (var i=0; i < aCookie.length; i++)  
	{
		var aCrumb = aCookie[i].split("=");    
		if (sName == aCrumb[0].replace(" ","")) 
		return unescape(aCrumb[1]); 
	}
	return "";
}

function SetCookie(sName, sValue)
{
	document.cookie = sName + "=" + escape(sValue) 	+ "; expires=Mon, 31 Dec 2010 23:59:59 UTC";
}

	var MidiPlay = GetCookie("MidiPlay");
	var FFF= GetCookie("FFF");
	if (FFF==0) {
		MidiPlay = 1;
		SetCookie("FFF",1);
	}else{
		if (MidiPlay=="undefined") MidiPlay = 1;
	}
	
if (navigator.appName == "Netscape")
{document.write("<layer id=dangdang top=300 width=80 height=88><iframe src='PlayMidi.asp?rnd=1&play="+MidiPlay+"' width=80 height=80 NORESIZE SCROLLING=No FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0></iframe></layer>"); 
myload()}
else
{
document.write("<div id=dangdang style='position: absolute;width:80;top:0;left:578;visibility: visible;z-index: 1'><iframe src='PlayMidi.asp?rnd=1&play="+MidiPlay+"' width=80 height=80 NORESIZE SCROLLING=No FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0></iframe></div>");
myload()
}