<!--
var maxh = window.screen.availHeight;
var maxw = window.screen.availWidth;
function PlayMusic(music,song){
	var w=350; var h=100;
	SongName=song; //SongName is declared in articleContent
	pW = window.open('client/playmusic.jsp?file='+music,'PlayMusic','resizable=no,status=no,scrollbars=no,toolbar=no,location=no,menu=no,width='+w+',height='+h+',top='+((maxh-h)/2)+',left='+((maxw-w)/2));
}//PlayMusic
function resizeWin() {
	var h=document.all?document.body.scrollHeight:document.height;
	var w=document.all?document.body.scrollWidth:document.width;
	if (h>maxh) h=maxh-30;
	if (w>maxw) w=maxw;
	window.resizeTo(w+100,h+30);
	window.moveTo((maxw-w)/2,(maxh-(h+30))/2);
}//resizeWin

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function wait(func,delay){
	setTimeout(func,delay);
}
var preImg,preImg2,preCaption,preGoUp,lastImage,tmrImg,loopCount=1; ;
function newImageWindow(img,caption,img2){
	preGoUp="";
	if(caption=='viewImgX') preGoUp='.';
	window.status = 'Loading Image, Please wait...';
	clearTimeout(tmrImg);
	/*lastImage = new Image();
	lastImage.src = preGoUp+img;*/
	preImg = img;
	preImg2=img2;
	preCaption=caption;
	vwImg();
}
function vwImg() {
spawnJimcoPopup(preGoUp+'./client/viewimg.jsp?img=.' + preImg + '&caption=' + preCaption + '&height=' + 100 + '&width=' + (100+10) + (preImg2?('&img2=' + preImg2):'')
		, '_blank'
		, ''//'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no'
		, (100+50),(100+10),'center','0','pixel');
	window.status = 'Done.';	
	return;
  if (loopCount%30==0) {
    if (!confirm('This image is having trouble loading. Continue to wait?')) {
      window.status = 'Cancelled.';
      return false;
    }
  }
  if (!lastImage.complete) {
    loopCount++
    window.status += '.'
    tmrImg = setTimeout("vwImg();", 500);
  } else{
    if (window.msg) {
      window.msg.close();
    }
	spawnJimcoPopup(preGoUp+'./client/viewimg.jsp?img=.' + preImg + '&caption=' + preCaption + '&height=' + lastImage.height + '&width=' + (lastImage.width+10) + (preImg2?('&img2=' + preImg2):'')
		, '_blank'
		, ''//'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no'
		, (lastImage.height+50),(lastImage.width+10),'center','0','pixel');	
    window.status = 'Done.';
  }
}

function spawnJimcoPopup(url, name, options, h, w, x, y, scaleType){
	if (scaleType == 'percent'){ 
		h = (h * screen.availHeight) / 100;
		w = (w * screen.availWidth) / 100;
	}
	//alert('test');
	//if (x == 'center')	
	x = (screen.availWidth - w) / 2;
	//if (y == 'center')	
	y = (screen.availHeight - h) / 2;
	options += ',width=' + w + ',height=' + h	+ ',left=' + x + ',top=' + y;
	var newWindow = window.open(url, name, options);
	newWindow.focus();
}

function onlyNumber(){
	if((event.keyCode<48)||(event.keyCode>57))	event.returnValue=false;
}
//Luan - START
function MM_changeProp(objName,x,theProp,theValue) { //v6.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
	if (theValue.toString() == 'true' || theValue.toString() == 'false')//Luan
      eval("obj."+theProp+"="+theValue);
    else eval("obj."+theProp+"='"+theValue+"'");
  }
}
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 replaceMe(strText, strFind, strReplace) {	
	var pattern = new RegExp(strFind,'ig'); 
	return strText.replace(pattern, strReplace); 
}//end function replaceMe
function quotes(str){
	str=replaceMe(str,String.fromCharCode(8220),'"');
	str=replaceMe(str,String.fromCharCode(8221),'"');
	str=replaceMe(str,String.fromCharCode(8216),"'");
	str=replaceMe(str,String.fromCharCode(8217),"'");
	return str;
}//quotes
//Luan - END

//-->
