﻿<!--
// 输出函数
function p$(string){
document.write(string);
}

//获取对象
function $(id) {
    return document.getElementById(id);
}

//检测是否输足位数
function isfull(thevalue,next,long){
	if(thevalue.length==long) document.getElementById(next).focus();
}
//去两端空格
function trim(str) {
	regExp1 = /^ */;
	regExp2 = / *$/;
	return str.replace(regExp1,'').replace(regExp2,'');
}

/*检测提示信息*/
function showhelp(thebox) {
	var box=document.getElementById(thebox);
	if (box.style.borderColor=="#00aaff"){
		box.style.borderColor="#FFFFFF";
		box.style.background="#FFFFFF";
		box.style.color="#666666";
		}
	else{
		box.style.borderColor="#00aaff";
		box.style.background="#e7f7ff";
		box.style.color="#000000";
		}
}

function showwarn(thebox) {
	var box=document.getElementById(thebox);
	box.style.borderColor='#FF6500';
	box.style.background='#FFF3EF';
	box.style.color='#000000';
}

function setdefault(thebox) {
	var box=document.getElementById(thebox);
	box.style.borderColor='#F5F5F5';
	box.style.background='#F5F5F5';
	box.style.color='#666666';
}
/*检测提示信息*/

//Colour pallete top offset
function getOffsetTop(elm) {
    var mOffsetTop = elm.offsetTop;
    var mOffsetParent = elm.offsetParent;
    while (mOffsetParent) {
        mOffsetTop += mOffsetParent.offsetTop;
        mOffsetParent = mOffsetParent.offsetParent;
    }
    return mOffsetTop;
}

//Colour pallete left offset
function getOffsetLeft(elm) {
    var mOffsetLeft = elm.offsetLeft;
    var mOffsetParent = elm.offsetParent;
    while (mOffsetParent) {
        mOffsetLeft += mOffsetParent.offsetLeft;
        mOffsetParent = mOffsetParent.offsetParent;
    }
    return mOffsetLeft;
}

function chkdiv(divid){
	var chkid=document.getElementById(divid);
	if(chkid != null){return true; }
	else {return false; }
}

//tab标签切换 
function change_menu(id,content_id,num,total_ztc_menu,menu_on,menu_off){
for (var i=1;i<=total_ztc_menu;i++){
$(id+i).className=menu_off;
$(content_id+i).style.display='none';
}
$(id+num).className=menu_on;
$(content_id+num).style.display='block';
}

function Falsh(url,w,h){
        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="'+w+'" height="'+h+'"> ');
        document.write('<param name="movie" value="' + url + '">');
        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="' + url + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'"></embed> ');
        document.write('</object> ');
}

function CreateFlash(focus_width,focus_height,text_height,texts,pics,links){
var swf_height = focus_height + text_height
var str = "<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 + "\">";
str += "<param name=\"allowScriptAccess\" value=\"sameDomain\">";
str += "<param name=\"movie\" value=\"/Utility/focus1.swf\">";
str += "<param name=\"quality\" value=\"high\">";
str += "<param name=\"bgcolor\" value=\"#F0F0F0\">";
str += "<param name=\"menu\" value=\"false\">";
str += "<param name=\"wmode\" value=\"opaque\">";
str += "<param name=\"FlashVars\" value=\"pics="+ pics + " &links="+links+"&texts="+ texts +"&borderwidth=" + focus_width + "&borderheight=" + focus_height + "&textheight=" + text_height + "\">";
str += "</object>";
document.write(str);
}

function CreateFlash_Thumbs(focus_width,focus_height,texts,pics,links)
{
document.writeln("<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http:\/\/fpdownload.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=7,0,0,0\" width=\""+focus_width+"\" height=\""+focus_height+"\" id=\"flash2\" align=\"middle\">");
document.writeln("<param name=\"allowScriptAccess\" value=\"sameDomain\" \/>");
document.writeln("<param name=\"movie\" value=\"/Utility/Flash_Thumbs.swf\" \/>");
document.writeln("<param name=\"quality\" value=\"high\" \/>");
document.writeln("<param name=\"bgcolor\" value=\"#ffffff\" \/>");
document.writeln("<param name=\"FlashVars\" value=\"ppurl="+pics+"&pplink="+links+"&ppfinfo="+texts+"\" \/>");
document.writeln("<embed src=\"/Utility/Flash_Thumbs.swf\" quality=\"high\" bgcolor=\"#EFF5FB\" width=\""+focus_width+"\" height=\""+focus_height+"\" name=\"flash2\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application\/x-shockwave-flash\" pluginspage=\"http:\/\/www.macromedia.com\/go\/getflashplayer\" \/>");
document.writeln("<\/object>");
}
//-->
