var strPath = "";

ver=parseInt(navigator.appVersion);
ie4=(ver>3  && navigator.appName!="Netscape")?1:0;
ns4=(ver>3  && navigator.appName=="Netscape")?1:0;
ns3=(ver==3 && navigator.appName=="Netscape")?1:0;

function playSound(sndName) 
{
 if (ie4) 
 {
  document.all['BGSOUND_ID'].src=sndName;
  document.all['BGSOUND_ID'].loop="9";
 }
 //if ((ns4||ns3)
 // && navigator.javaEnabled()
 // && navigator.mimeTypes['audio/x-midi']
 // && self.document.soundCtrl.IsReady()
 //)
 //{
 // self.document.soundCtrl.play()
 //}
}

function stopSound()
{
 if (ie4) document.all['BGSOUND_ID'].src='jsilence.mid';
 //if ((ns4||ns3)
 //  && navigator.javaEnabled()
 //  && navigator.mimeTypes['audio/x-midi']
 //)
 //{
 // self.document.soundCtrl.stop()
 //}
}

function ImgChange(imgName)
{
	var ImgObj2 = document.getElementById('MainCover');
	ImgObj2.src= '../../Image/' + strPath + '/' + imgName + '.jpg';
}

function articleOpen(strUrl,intArticleWidth,intArticleHeight)
{
	//var showArticle;
	showArticle = open(strUrl,"articlewindow","left=60,top=180,toolbar=no,directories=no,menubar=no,width=" + intArticleWidth.toString() + ",height=" + intArticleHeight.toString());
	//showArticle.focus();
	//return false;
}

function ImgOpen(strImagePath,intImageWidth,intImageHeight)
{
	var showImage;
	showImage= open("","displaywindow","left=10,top=10,toolbar=no,directories=no,menubar=no,width=" + intImageWidth.toString() + ",height=" + intImageHeight.toString());
	showImage.document.write("<head><title>Image</title><style>body{margin-left: 0px;margin-top: 0px;}</style></head>");
	showImage.document.write("<center><IMG  src='"+strImagePath+"'></center>");
}

function movieOpen(strMoviePath,intMovieWidth,intMovieHeight)
{
	//var msg1;
	var tmpHeight=intMovieHeight-20;
	msg1= open("","displaywindow","left=100,top=120,toolbar=no,directories=no,menubar=no,width=" + intMovieWidth.toString() + ",height=" + tmpHeight.toString());
	msg1.document.write("<head><title>Movie</title><style>body{margin-left: 0px;margin-top: 0px;}</style></head>");
	msg1.document.write("<OBJECT id=moviePlayer codeBase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,05,0809 ");
	msg1.document.write("type=application/x-oleobject width=" + intMovieWidth.toString() + " height="+ tmpHeight.toString() +" ");
	msg1.document.write("standby='Loading Microsoft Windows Media Player components...' ");
	msg1.document.write("classid=CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95>");
	msg1.document.write("<PARAM NAME='ShowControls' VALUE='1'>");
	msg1.document.write("<PARAM NAME='ShowStatusBar' VALUE='0'>");
	msg1.document.write("<PARAM NAME='AnimationAtStart' VALUE='0'>");
	msg1.document.write("<PARAM NAME='autostart' VALUE='1'>");
	msg1.document.write("<PARAM NAME='FileName' VALUE='" + strMoviePath + "'>");
	msg1.document.write("</OBJECT>");
}

// start for rollover image
function preloadImages1() { //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=preloadImages1.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 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 findObj1(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=findObj1(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function swapImage1() { //v3.0
  var i,j=0,x,a=swapImage1.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=findObj1(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function chk()
{
	alert(strPath);
}
