function fSlideTitle(txt){
	var obj=document.getElementById("oSlideTitle")
	if(txt)
		obj.outerHTML='<marquee id="oSlideTitle" style="width:90px; height:20px;" width="90" height="20" direction="up" behavior="slide" scrollamount="5" scrolldelay="10">'+ txt +'</marquee>';
	else
		obj.innerHTML="";
}

		var oScrollThumbsTimer;
		function fScrollThumbs(bMove, nDirection){
			if(bMove)
				oScrollThumbsTimer=setInterval("fDoScroll("+ nDirection +")", 40)
			else
				clearInterval(oScrollThumbsTimer);
		}

		function fDoScroll(nDirection){
			var obj=document.getElementById("oConnectedUsers");
			obj.scrollTop=(nDirection==1 ? obj.scrollTop+1 : obj.scrollTop-1);
		}


// <script type="text/javascript">
//	fWriteFlashObject(nID, sUrl, nWidth, nHeight, sBG, bTransparent, sCssClass, bLiveCon)
// </script>

function fWriteFlashObject(sID, sUrl, nWidth, nHeight, sBG, bTransparent, sCssClass, bLiveCon){
	var sSSL=(location.href.indexOf("https")>=0 ? "s" : "");
	document.write('<object id="'+ sID +'" width="'+ nWidth +'" height="'+ nHeight +'" class="'+ sCssClass +'" swLiveConnect="'+ (bLiveCon ? 'true' : 'false') +'" codebase="http"+ sSSL +"://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">')
	document.write('<param name="movie" value="'+ sUrl +'">')
	if(bTransparent) document.write('<param name="wmode" value="transparent" />');
	document.write('<param name="bgcolor" value="'+ sBG +'" />');
	document.write('<param name="quality" value="high">');
	document.write('<embed id="'+ sID +'" src="'+ sUrl +'" width="'+ nWidth +'" height="'+ nHeight +'" class="'+ sCssClass +'" bgcolor="'+ sBG +'" '+ (bTransparent ? 'wmode="transparent"' : '') +' quality="high"  TYPE="application/x-shockwave-flash" PLUGINSPAGE="http"+ sSSL +"://www.macromedia.com/go/getflashplayer"></embed>')
	document.write('</object>');
}


function fWriteMovieObject(sUrl){
	if(!sUrl) return false;
	var nHeight=0, sExt=sUrl.substr(sUrl.length-3, sUrl.length);
	if(sExt=="wma" || sExt=="mp3")
		nHeight=150
	else{
		if(sExt=="wmv")
			nHeight=320
		else
			return false;
	}

	document.write('<object width="320" height="'+ nHeight +'" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">')
		document.write('<param name="url" value="'+ sUrl +'">')
		document.write('<param name="uimode" value="full">');
		document.write('<param name="autostart" value="-1">');
		document.write('<param name="rate" value="1">');
		document.write('<param name="balance" value="0">');
		document.write('<param name="currentPosition" value="-1">');
		document.write('<param name="defaultFrame" value>');
		document.write('<param name="playCount" value="1">');
		document.write('<param name="currentMarker" value="0">');
		document.write('<param name="invokeURLs" value="-1">');
		document.write('<param name="baseURL" value>');
		document.write('<param name="volume" value="50">');
		document.write('<param name="mute" value="0">');
		document.write('<param name="stretchToFit" value="0">');
		document.write('<param name="windowlessVideo" value="0">');
		document.write('<param name="enabled" value="-1">');
		document.write('<param name="enableContextMenu" value="-1">');
		document.write('<param name="fullScreen" value="0">');
		document.write('<param name="SAMIStyle" value>');
		document.write('<param name="SAMILang" value>');
		document.write('<param name="SAMIFilename" value>');
		document.write('<param name="captioningID" value>');
		document.write('<param name="enableErrorDialogs" value="0">');
		document.write('<embed width="320" height="320" src="'+ sUrl +'" filename="'+ sUrl +'" autostart="True" showcontrols="True" showstatusbar="True" showdisplay="True" autorewind="True"></embed> ');
	document.write('</object>');
}


// THIS FUNCTION GENERATES FAKE <A HREF="MAILTO:..."> TAG
function fPrintEmailLink(sUserName, sDomain, linkText, linkTitle, cssClass, sSubject, sBody){
	var sQS=""
	if(!sUserName || !sDomain) return false;
	var sLinkText=linkText||null, sLinkTitle=linkTitle||null, sCssClass=cssClass||null;
	if(!sLinkText) sLinkText=sUserName +"@"+ sDomain;

	if(sSubject || sBody) sQS+="?";
	if(sSubject) sQS+="subject="+ sSubject;
	if(sSubject && sBody) sQS+="&";
	if(sBody) sQS+="body="+ sBody;

	if(sLinkTitle) sLinkTitle=" title='"+ sLinkTitle +"'"
	if(sCssClass) sCssClass=" class='"+ sCssClass +"'"

	document.write("<a "+ sLinkTitle +" "+ sCssClass +" href='m&#97;ilto:"+ sUserName +"&#64;"+ sDomain + sQS +"'>"+ sLinkText +"</a>")
}

var nLastQnaClicked;
function fQuestions(qID){
	var q=document.getElementById("oQuestion"+ qID)
	var a=document.getElementById("oAnswer"+ qID)

	if(nLastQnaClicked && nLastQnaClicked!=qID){
//		document.getElementById("oQuestion"+ nLastQnaClicked).style.fontWeight="500";
		document.getElementById("oAnswer"+ nLastQnaClicked).style.display="none";
	}

	if(a.style.display=="block"){
//		q.style.fontWeight="500";
		a.style.display="none";
	}
	else{
//		q.style.fontWeight="800";
		a.style.display="block";
	}

	nLastQnaClicked=qID;
}

function PopUp(url, width, height){
	window.open(url,null,"width="+(width||500)+", height="+(height||300)+", scrollbars=yes, resizable=no")
}

function fPopupImage(url){
	if(url) window.open("imgPopUp.asp?url="+ url,"winPopupImage","width=5,height=5,resizable=yes")
}

function fSendToFriend(isEng){
	window.open((isEng?"/English":"") + "/Send2Friend.asp?title="+ document.title, "winSendToFriend", "width=400,height=390");
}

function fPrintPage(isEng){
	window.open((isEng?"/English":"") + '/print.html', 'winPrint', 'width=700, height=400, scrollbars=yes');
}
