TT.init();
window.onload=function(){
  try{
   if($("showText")){
     fun();
   }
   if('undefined' != swf){
	   if(swf != null && swf.indexOf("http://") == -1 &&swf.lastIndexOf(".swf")== -1){
	         createFLV(swf);
	   }else{
	        //flash播放常用
	        createSWF(swf);
	   }
   }
  }catch(e){
  }
};
function playMyVideo(swf){
	if('undefined' != swf){
	   if(swf != null && swf.indexOf("http://") == -1 &&swf.lastIndexOf(".swf")== -1){
	         createFLV(swf);
	   }else{
	        //flash播放常用
	        createSWF(swf);
	   }
   }
   return false;
}
function createQueryString(){
  var pagenum = $("pagenum").value;
  var type = $("typeid").value;
  var key = $("key").value;
  var typename = $("typename").value;
  return "video.jsp?pagenum="+pagenum+"&typeid="+type+"&key="+encodeURIComponent(key)+"&typename="+encodeURIComponent(typename);
}
function createQueryString_comm(){
  var pagenum = $("pagenum").value;
  return "?pagenum="+pagenum;
}
function createQueryString_A(){
  var pagenum = $("pagenum").value;
  var subType = $("subType").value;
  var typeName = $("typeName").value;
  return "list.jsp?subType="+subType+"&pagenum="+pagenum+"&typeName="+encodeURIComponent(typeName);
}
function createFLV(swf){
  var html = '<object id="flashid" type="application/x-shockwave-flash" data="'+path+'/swf/player.swf?file='+path+'/upload/'+swf+'" width="100%" height="100%">'
 			+' <param name="movie" value="'+path+'/swf/player.swf?file='+path+'/upload/'+swf+'&autoStart=true" />'
 			+' <param name="wmode" value="transparent">'
 			+' <embed wmode="transparent" src="../swf/player.swf?file='+path+'/upload/'+swf+'&autoStart=false" quality="high" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" width="100%" height="100%"></embed>'
		    +' </object>';
  $("myFlash").innerHTML = html;
}
function createSWF(swf){
  //创建swfobject
   if(swf){
    var str = swf.indexOf("http://") == -1?domain+"path="+swf:swf;
    var fo = new SWFObject(str, "movie_player", "100%", "100%", 7, "#FFFFFF");
    // fo.addVariable("isFullScreen","true");
     fo.addVariable("playMode","mp4");  
     fo.addVariable("isAutoPlay",false);
	 fo.addVariable("Version","/v1.0.0436");
	 fo.addVariable("winType","interior");
	 
	 //iku 只在ie缓冲下载提示
	if(navigator.userAgent.indexOf('MSIE') != -1){
		fo.addVariable("ikuison","1");
		//iku 缓冲多少次后提示
		fo.addVariable("iku_num","2");
	}
	fo.addParam("allowFullScreen",true);
	fo.addParam("allowscriptaccess","always");
	fo.addParam("quality","high");
	fo.addParam("wmode","transparent"); 
	fo.write("myFlash");
    window.focus();
   }
}
function fun(e){
	var val;
	var typeName;
	if(e==undefined){
		val = "001002001";
		typeName = "苏绣";
	}else{
		val = e.value;
		typeName = e.title;	
	}
	var parameters="subType="+val+"&typeName="+encodeURI(encodeURI(typeName));
	if(Ajax){
	  Ajax.request({
	     url:"listBySubType.jsp?"+parameters,
	     method:"get",
		 call:function(IIa){
		    parseMessage(IIa);
		 }
	 });
	}
	//listBySubType.jsp
  
}
function parseMessage(req){
    var sign=req.responseText;
	var showText=document.getElementById("showText");
	showText.innerHTML=sign;
}

function searchQuest(){
  document.form3.submit();
}