//<![CDATA[
//media player
function mpPlayer(mpsrc,widthpx,heightpx){
	var mStr = '';
	mStr += ('<object align="middle" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" class="OBJECT" id="MediaPlayer" width="'+ widthpx +'" height="'+ heightpx +'">');
	mStr += ('<param name="ShowStatusBar" value="-1">');
	mStr += ('<param name="Filename" value="'+ mpsrc +'">');
	mStr += ('<embed type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" flename="mp" src="'+ mpsrc +'" width="'+ widthpx +'" height="'+ heightpx +'">');
	mStr += ('</embed></object>');
	document.write(mStr);
}

//real player
function rmPlayer(rmsrc,widthpx,heightpx){
	var rStr = '';
	rStr += ('<object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" class="OBJECT" id="RAOCX" width="'+ widthpx +'" height="'+ heightpx +'">');
	rStr += ('<param name="src" value="'+ rmsrc +'">');
	rStr += ('<param name="console" value="Clip1">');
	rStr += ('<param name="controls" value="imagewindow">');
	rStr += ('<param name="autostart" value="true"></object><br />');
	rStr += ('<object classid="CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA" height="'+ heightpx +'" id="video2" width="'+ widthpx +'">');
	rStr += ('<param name="src" value="'+ rmsrc +'">');
	rStr += ('<param name="autostart" value="-1">');
	rStr += ('<param name="controls" value="controlpanel">');
	rStr += ('<param name="console" value="Clip1"></object>');
	document.write(rStr);
}

//quick time player
function qtPlayer(qtsrc,widthpx,heightpx){
	var qStr = '';
	qStr += ('<embed src="'+ qtsrc +'" width="'+ widthpx +'" height="'+ heightpx +'" autoplay="true" loop="fals"e controller="true" playeveryframe="false" cache="false" scale="TOFIT" bgcolor="#000000" kioskmode="false" targetcache="false" pluginspage="http://www.apple.com/quicktime/">');
	document.write(qStr);
}

//director player
function dirPlayer(dirsrc,widthpx,heightpx){
	var dirStr = '';
	dirStr += ('<object classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=7,0,2,0" width="'+ widthpx +'" height="'+ heightpx +'">');
	dirStr += ('<param name="src" value="'+ dirsrc +'">');
	dirStr += ('<embed src="'+ dirsrc +'" pluginspage="http://www.macromedia.com/shockwave/download/" width="'+ widthpx +'" height="'+ heightpx +'">');
	dirStr += ('</embed></object>');
	document.write(dirStr);
}

//transparent background flash
function transFlash(flashsrc,widthpx,heightpx){
	var fStr = '';
	fStr += ('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+ widthpx +'" height="'+ heightpx +'">');
	fStr += ('<param name="movie" value="'+ flashsrc +'">');
	fStr += ('<param name="quality" value="high">');
	fStr += ('<param name="menu" value="false">');
	fStr += ('<param name="wmode" value="transparent">');
	fStr += ('<embed src="'+ flashsrc +'" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ widthpx +'" height="'+ heightpx +'">');
	fStr += ('</embed>');
	fStr += ('</object>');
	document.write(fStr);
}

//common flash
function commonFlash(flashsrc,widthpx,heightpx){
	var fStr = '';
	fStr += ('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+ widthpx +'" height="'+ heightpx +'">');
	fStr += ('<param name="movie" value="'+ flashsrc +'">');
	fStr += ('<param name="quality" value="high">');
	fStr += ('<param name="menu" value="false">');
	fStr += ('<embed src="'+ flashsrc +'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ widthpx +'" height="'+ heightpx +'">');
	fStr += ('</embed>');
	fStr += ('</object>');
	document.write(fStr);
}

//open a new window
function newin(srcurl){
	window.open(srcurl);
	return false;
}
//check all out
function CheckAll(form)  {
  for (var i=0;i<form.elements.length;i++)    {
    var e = form.elements[i];
    if (e.name != 'chkall')       e.checked = form.chkall.checked; 
   }
}
//zoom the image size
function bbimg(o)
{
  var zoom=parseInt(o.style.zoom, 10)||100;
  zoom+=event.wheelDelta/12;
  if (zoom>0) o.style.zoom=zoom+'%';
  return false;
}

//change the font size of article
function set_Fontsize(docID,CtrlType){
var AID = document.getElementById(docID);
	if(CtrlType=='plus'){ 
		AID.style.fontSize=eval(parseInt(AID.style.fontSize)+2)+"px";
	}else{ 
		if(parseInt(AID.style.fontSize)>=12)
			AID.style.fontSize=eval(parseInt(AID.style.fontSize)-2)+"px";
		else
			AID.style.fontSize="12px";
	} 
}

//change the line height of article
function set_lineheight(docID,CtrlType){
var AID = document.getElementById(docID);
	if(CtrlType=='plus') {
		AID.style.lineHeight=eval(parseInt(AID.style.lineHeight)+4)+"px";
	}else{ 
		if(parseInt(AID.style.lineHeight)>14)
			AID.style.lineHeight=eval(parseInt(AID.style.lineHeight)-4)+"px";
		else
			AID.style.lineHeight="14px";
	}
}

//set the active style sheet
function setActiveStyleSheet(title) {
  var i, a, main;
  if (title) {
    for(i=0; (a = document.getElementsByTagName('link')[i]); i++) {
      if(a.getAttribute('rel').indexOf('style') != -1 && a.getAttribute('title')) {
        a.disabled = true;
        if(a.getAttribute('title') == title)  a.disabled = false;
      }
    }
  }
}

function getActiveStyleSheet() {
    var i, a;
    for(i=0; (a = document.getElementsByTagName('link')[i]); i++) {
      if(a.getAttribute('rel').indexOf('style') != -1 && a.getAttribute('title') && !a.disabled) return a.getAttribute('title');
    }
    return null;
}

function check_blog_reply() {	//return check blog form
/*
var feedform = document.getElementById('feedback');
	if (checkspace(feedform.gname.value))
	{
		feedform.gname.focus();
		alert('Please enter your name');
		return false;
	}
*/
/*
	if ((document.feedback.fbContent.value.length<10) || (document.feedback.fbContent.value.length>2000))
	{
		document.feedback.fbContent.focus();
		alert('The text length is limited in 10 and 2000');
		return false;
	}
*/
}

function check_mail_send() {	//return check mail form
/*
	var formid = document.getElementById('mainform');
	if (checkspace(formid.fromname.value))
	{
		formid.fromname.focus();
		alert('Please enter you name');
		return false;
	}
	if (checkspace(formid.fromemail.value))
	{
		formid.fromemail.focus();
		alert('Please enter your email');
		return false;
	}
	if (checkspace(formidmailsubject.value))
	{
		formid.mailsubject.focus();
		alert('Please enter the subject');
		return false;
	}
*/
}

function check_vote_post() {	//return check vote post
/*
	var voteid = document.getElementById('voteform');
	if (voteid.checkid.value.length<2)
	{
		alert('Please select one at least');
		return false;
	}
*/
}

//check if the str length is null
function checkspace(checkstr) {
	var str = '';
	for(i = 0; i < checkstr.length; i++) {
		str = str + ' ';
	}
return (str == checkstr);
}
/*
//open visited stat window
function document.onkeydown() {
	if(event.altKey && event.keyCode==73) {
		open('/s/?act=&amp;date=<%=date()%>');  //View IP Record
	}
}
*/
//]]>
