﻿// JavaScript Document

//~~获取控件
function $(objid){
	return document.getElementById(objid);
}
function $$(emName){
	return document.getElementsByTagName(emName);
}

function InsertFlash(Flash,Width,Height){
	document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" ");
	document.write("codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" ");
	document.write("width=\"" + Width + "\" height=\"" + Height + "\">");
	document.write("<param name=\"movie\" value=\"" + Flash + "\">");
	document.write("<param name=\"quality\" value=\"high\">");
	document.write("<param name=\"wmode\" value=\"transparent\">");
	document.write("<embed src=\"" + Flash + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" ");
	document.write("type=\"application/x-shockwave-flash\" width=\"" + Width + "\" height=\"" + Height + "\"></embed>");
	document.write("</object>");
}

function focusFlash(JsPics,JsLinks,JsTexts,w,h,texth){
	var pics=JsPics;
	var links=JsLinks;
	var texts=JsTexts;
	var focus_width=w;
	var focus_height=h;
	var text_height=texth;
	var swf_height=focus_height+text_height;
	
	document.write('<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 +'">');
	document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="images/focus.swf"> <param name="quality" value="high"><param name="bgcolor" value="#CCCCCC">');
	document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
	document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
	document.write('<embed src="images/focus.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#ffffff" quality="high" width="'+ focus_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>'); 
}

function flashzone(str){
	var outStr="";
	switch(str){
		case "天津":
		case "山东":
		case "大连":
			outStr="天津、山东、大连,俞伟甦(区域经理),13388077571,sales@wxlongda.com";
			break;
		case "苏南":
			outStr="江苏南部,吕全福（区域经理）,13801516225,sales@wxlongda.com";
			break;
		case "上海":
			outStr="上海,任岳虎（区域经理）,13395160081,sales@wxlongda.com";
			break;
		case "苏北":
			outStr="江苏北部,吕建明（区域经理）,13801516221,sales@wxlongda.com";
			break;
		case "安徽":
		case "湖北":
			outStr="安徽、湖北,郭良（区域经理）,13861840227,sales@wxlongda.com";
			break;
		case "四川":
		case "重庆":
			outStr="四川、重庆,陈秋兴（区域经理）,13182751951,sales@wxlongda.com";
			break;
		case "北京":
			outStr="北京,范才根（区域经理）,13910301890,sales@wxlongda.com";
			break;
		default:
			outStr="营销本部,马列东,13921105878,mld195@wxlongda.com";
	}
	var outArr = new Array();
	outArr=outStr.split(",");	
	$("sArea").innerHTML=outArr[0];
	$("sName").innerHTML=outArr[1];
	$("sTel").innerHTML=outArr[2];
	$("sEmail").innerHTML=outArr[3];
	outArr=null;outStr=null;
}
