function flash(fm,w,h) {
	var url = fm;
	url = url.split(".");
	url = url[url.length-1]
	var _data ="";
	if (url=="jpg" || url=="gif" || url=="png"){
		_data+="	<img src=\""+fm+"\" width=\""+w+"\" height=\""+h+"\" border=0>";
	}
	else
		{
	_data+="<object classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000 ";
	_data+="codebase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0 width="+w+" height="+h+">";
	_data+="	<param name=allowScriptAccess value=sameDomain>";
	_data+="	<param name=movie value=\""+fm+"\">";
	//_data+="	<param name=quality value=high>";
	_data+="	<param name=wmode value=transparent>";
	_data+="	<param name=menu value=false>";
	_data+="	<param name=wmode value=transparent/>";
	_data+="	<embed src=\""+fm+"\"";
	_data+="	quality=high pluginspage=http://www.macromedia.com/go/getflashplayer ";
	_data+="	type=application/x-shockwave-flash wmode=transparent allowScriptAccess=sameDomain width="+w+" height="+h+"></embed>";
	_data+="</object>";
	}
	document.write(_data);
}
function qiehuan(focus_width,focus_height,text_height){
	//var pics='images/1.jpg|images/2.jpg|images/3.jpg';
	//var links='http://www.baidu.com/|http://www.baidu.com/|http://www.baidu.com/';
	//var texts='标题1|标题2|标题3';
	//var focus_width=200;
	//var focus_height=150;
	//var text_height=0;
	var swf_height = focus_height+text_height;
	var qhpic="";
	qhpic+='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">';
	qhpic+='<param name="allowScriptAccess" value="sameDomain">';
	qhpic+='<param name="movie" value="pic.swf">';
	qhpic+='<param name="quality" value="high">';
	qhpic+='<param name="bgcolor" value="#ffffff">';
	qhpic+='<param name="menu" value="false">';
	qhpic+='<param name=wmode value="opaque">';
	qhpic+='<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">';
	qhpic+='<embed src="pic.swf" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&pic_width='+focus_width+'&pic_height='+focus_height+' quality="high" width="'+ focus_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	qhpic+='</object>';
	document.write(qhpic);
}
function duibi(){
if(document.form1.vid.value==""){
   alert("用户名不能为空!");
   return false;
}
else{
    document.form1.action="/House/House_show.asp";
	document.form1.submit();
}
}
function check_ly()
{
	if (document.formly.name.value=="")
	{
		alert("用户名不能为空!");
		document.formly.name.focus();
		return false;
	}
	if (document.formly.dianhua.value=="")
	{
		alert("电话不能为空!");
		document.formly.dianhua.focus();
		return false;
	}
	var t=/(^\d{4}-(\d{8}|\d{7})$)|(^\d{2}-\d{3}-(\d{8})$)/g;
	var tel = document.formly.dianhua.value;
	if (!t.test(tel))
	{
		alert("电话格式不正确!");
		document.formly.dianhua.focus();
		return false;
	}
	if (document.formly.dizhi.value=="")
	{
		alert("地址不能为空!");
		document.formly.dizhi.focus();
		return false;
	}
	if (document.formly.content.value=="")
	{
		alert("详细内容不能为空!");
		document.formly.content.focus();
		return false;
	}
	if (document.formly.CheckCode.value=="")
	{
		alert("验证码不能为空!");
		document.formly.CheckCode.focus();
		return false;
	}
	return true;
}
function dinggou()
{
	if (document.form1.proname.value=="")
	{
		alert("名称不能为空!");
		document.form1.name.focus();
		return false;
	}
	if (document.form1.name.value=="")
	{
		alert("姓名不能为空!");
		document.form1.name.focus();
		return false;
	}
	if (document.form1.dianhua.value=="")
	{
		alert("电话不能为空!");
		document.form1.dianhua.focus();
		return false;
	}
	if (document.form1.dizhi.value=="")
	{
		alert("地址不能为空!");
		document.form1.dizhi.focus();
		return false;
	}
	if (document.form1.beizhu.value=="")
	{
		alert("详细内容不能为空!");
		document.formly.beizhu.focus();
		return false;
	}
	return true;
}
function showDiv(obj,num,len)
{
 for(var id = 1;id<=len;id++)
 {
  var ss=obj+id;
  if(id==num){
  try{document.getElementById(ss).style.display="block"}catch(e){};
  }else{
  try{document.getElementById(ss).style.display="none"}catch(e){};
  }
 }  
}

function imgalpha(sid,imgid)
{
	imgstyle = eval("imglb" + sid);
		if (imgid == "1")
		{
			imgstyle.className="imglb2";
			}
		else
			{
			//alert(imgstyle)
			imgstyle.className="imglb";
		}
}
function time(){
	tmpDate = new Date(); 
	date = tmpDate.getDate(); 
	month= tmpDate.getMonth() + 1 ; 
	year= tmpDate.getYear(); 
	//document.write(year);
	//document.write("年"); 
	//document.write(month); 
	//document.write("月"); 
	//document.write(date); 
	//document.write("日 "); 
	myArray=new Array(6); 
	myArray[0]="星期日    " 
	myArray[1]="星期一    " 
	myArray[2]="星期二    " 
	myArray[3]="星期三    " 
	myArray[4]="星期四    " 
	myArray[5]="星期五    " 
	myArray[6]="星期六    " 
	weekday=tmpDate.getDay(); 
	if (weekday==0 | weekday==6){ 
		//document.write(myArray[weekday]) 
		xingqi=myArray[weekday]
	}
	else{
		xingqi=myArray[weekday]
		//document.write(myArray[weekday]) 
	}
	document.getElementById("TxtTime").innerHTML="今天是："+year+"年"+month+"月"+date+"日"+xingqi
}
