//System
function flash(ur1,w1,h1){
	document.write('<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="'+w1+'" height="'+h1+'">');
	document.write('<param name="movie" value="' + ur1 + '">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="wmode" value="transparent">');
	document.write('<param name="menu" value="false">');
	document.write('<embed src="' + ur1 + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + w1 + '" height="' + h1 + '"></embed>');
	document.write('</object>');		
};
function sVideo(){
	var str="<EMBED src=http:\/\/vod.alibaba.com\/50\/13\/75\/49\/50137549_56.asf width=350 height=300 type=audio\/x-pn-realaudio-plugin console=\"Clip1\" controls=\"IMAGEWINDOW,ControlPanel,StatusBar\" autostart=\"true\" loop=\"true\">";
	var str2="<IMG src=\"http:\/\/img.alibaba.com\/images\/eng\/style\/icon\/icon_video_02.gif\" border=0> <A onclick=hVideo() href=\"javascript:;\">Video Intro<\/A>";
	if(document.getElementById("videocontrol")){
	document.getElementById("videocontrol").innerHTML=str2;
	}
	if(document.getElementById("videoarea")){
	document.getElementById("videoarea").innerHTML=str;
	}
};
function hVideo(){
	var str="<IMG src=\"http:\/\/img.alibaba.com\/images\/eng\/style\/icon\/icon_video_02.gif\" border=0> <A onclick=sVideo() href=\"javascript:;\">Video Intro<\/A>";
	if(document.getElementById("videocontrol")){
	document.getElementById("videocontrol").innerHTML=str;
	}
	if(document.getElementById("videoarea")){
	document.getElementById("videoarea").innerHTML="";
	}
};
// Top scroll
function getPosition(){
	var start, end, scale, term;
	start = parseInt (document.getElementById('quick').style.top, 10);
	end = document.documentElement.scrollTop + 400;
	term = 5;

	if ( start != end ) {
	scale = Math.ceil( Math.abs( end - start ) / 20 );
		if ( end < start )	scale = -scale;
		document.getElementById('quick').style.top = parseInt (document.getElementById('quick').style.top, 10)+ scale + "px";
		term = 1;
	}
	setTimeout ("getPosition()", term);
};
function moveBanner() {
	document.getElementById('quick').style.top = document.documentElement.scrollTop + 400 + "px";
	getPosition();
	return true;
};
function goBack(t) {
	switch(t){
		case "p":
		window.location="products.asp";
		break;
		case "n":
		window.location="news.asp";
		break;
		case "t":
		window.location="team.asp";
		break;
		default:
		window.history.back();
		break;
	}
};
function _play(val,txt,pic){
		var str;
/*		str="<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=7,0,19,0\" width=\"500\" height=\"400\">";
		str+="    <param name=\"movie\" value=\"video\/Flvplayer.swf\" \/>";
		str+="    <param name=\"quality\" value=\"high\" \/>";
		str+="    <param name=\"allowFullScreen\" value=\"true\" \/>";
		str+="    <param name=\"FlashVars\" value=\"vcastr_file=http://www.lenotec.cn/video\/"+val+"&LogoText=www.wasam.hk&BufferTime=3\" \/>";
		str+="    <embed src=\"video\/flvplayer.swf\" allowfullscreen=\"true\" flashvars=\"vcastr_file=http://www.lenotec.cn/video\/"+val+"&LogoText=www.wasam.hk\" quality=\"high\" pluginspage=\"http:\/\/www.macromedia.com\/go\/getflashplayer\" type=\"application\/x-shockwave-flash\" width=\"500\" height=\"400\"><\/embed>";
		str+="  <\/object>";*/
		// <![CDATA[
		var so1 = new SWFObject('images/player.swf','flv','480','360','8', '#000000');
		so1.addParam('allowfullscreen','true');
		so1.addParam('allowscriptaccess','always');
		so1.addParam('wmode', 'opaque');
		so1.addParam('file', 'http://'+val);
		so1.addParam('image', 'images/'+pic);
		so1.addParam('volume', '80');
		so1.addParam('flashvars','file=http://'+val+'&image=images/'+pic+'&skin=images/stylish.swf&volume=80&bufferlength=5&fullscreen=true&stretching=exactfit&controlbar=over&allowscriptaccess=always&allowfullscreen=true');
		
		so1.addVariable('bufferlength', '5');
		so1.addVariable('fullscreen', 'true');
		so1.addVariable('stretching', 'exactfit');
		so1.addVariable('controlbar', 'over');
		so1.addVariable('backcolor', '111111');
		so1.addVariable('frontcolor', 'cccccc');
		so1.addVariable('lightcolor', '66cc00');
		so1.addVariable('screencolor', '');
		so1.addVariable('skin', 'images/stylish.swf');
		so1.addVariable('autostart', 'true');
		so1.write('playcontent');
		// ]]>
		document.getElementById("playtitle").innerHTML=txt;
		//document.getElementById("playcontent").innerHTML=str;
		
};
function hr(){
	var newin=window.open("redirect.asp");
};
function s(e){
	return document.getElementById(e);
};
function changpic(j){
	document.getElementById('bigpic').src = picuri[j];
	/*document.getElementById('picintro').innerHTML = picintro[j];*/
}