areaArray=['北京','天津','龙江','吉林','辽宁','内蒙','河北','河南','山东','山西','江苏','浙江','上海','福建','安徽','江西','湖北','湖南','广东','广西','海南','贵州','云南','重庆','四川','西藏','陕西','甘肃','宁夏','青海','新疆','香港','澳门','台湾','海外'];

function showFlash(swf,id,w,h,n){
	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+'" name="'+n+'" id="'+n+'">');
	document.write('<param name="quality" value="high"><param name="swLiveConnect" value="true"><param name="menu" value="false"><param name="wmode" value="transparent">');
	document.write('<param name="movie" value="Other/'+swf+'"><param name="FlashVars" value="id='+id+'"></object>');
}

function setEditorStr(formName,sContent){
	var oEditor = FCKeditorAPI.GetInstance(formName);
	oEditor.InsertHtml(sContent);
}

function imgzoom(o) {
	if(event.ctrlKey) {
		var zoom = parseInt(o.style.zoom, 10) || 100;
		zoom -= event.wheelDelta / 12;
		if(zoom > 0) {
			o.style.zoom = zoom + '%';
		}
		return false;
	} else {
		return true;
	}
}

function picFun(){
	try{
		var imgObjs=document.images;
		for (var i=0; imgObjs.length ; i++){
			var curObj=imgObjs[i];
			if (!curObj.complete) reloadPic(curObj);
		}
	} catch (e){}
}
	
function reloadPic(imgObj){
	try{
		var imgIndex=Math.floor(Math.random()*6);
		var sourceSrc=imgObj.src;
		var nod=document.createElement("SPAN");
		nod.innerHTML="<br>原图地址：<a target='_blank' href='"+sourceSrc+"'>"+sourceSrc+"</a>";
		if (imgObj.parentNode!=null && imgObj.parentNode.tagName=="A")
			imgObj.parentNode.insertAdjacentElement("afterEnd",nod);	
		else
			imgObj.insertAdjacentElement("afterEnd", nod);
    imgObj.src="Other/ErrPic/ErrPic00"+imgIndex+".gif";	
	} catch (e){}
}			


//title effect
var sPop = null;
document.write("<style type='text/css'>");
document.write(".PopText { font-family: Tahoma, 宋体; color: #3B676E; background-color: #ffffff; border: 2px #37a1b7 solid; font-size: 14px; font-weight: bold; line-height: 20px; padding: 0px 10px 0px 10px; visibility: hidden; filter: Alpha(Opacity=0)}");
document.write("</style>");
document.write("<div id='popLayer' style='position:absolute;z-index:1000;filter:revealtrans(duration=.5,transition=12) revealTrans(duration=.5,transition=12) alpha(opacity=90,enabled=100)' class='PopText'></div>");

function showPopupText() {
	var o=event.srcElement;
	MouseX=event.x;
	MouseY=event.y;
	if(o.alt!=null && o.alt!="") { o.pop=o.alt;o.alt="" }
        if(o.title!=null && o.title!=""){ o.pop=o.title;o.title="" } 
		if(o.pop) { 
			o.pop=o.pop.replace("\n","<br>"); 
		    o.pop=o.pop.replace("\n","<br>");	
					}
	if(o.pop!=sPop) {
		sPop=o.pop;
		if(sPop==null || sPop=="") {
			popLayer.filters[0].apply();
			popLayer.style.visibility="hidden";	
			popLayer.filters[0].play();
			popLayer.style.width=""
		} else {
			if(o.dyclass!=null) popStyle=o.dyclass 
			else popStyle="PopText";
             
			popLayer.filters[1].apply();
			popLayer.style.visibility="visible";
			popLayer.filters[1].play();
			showIt();
			if (popLayer.offsetWidth>500)
			{
				popLayer.style.width=500
			}
		}
	}
}

function showIt() {
	popLayer.className=popStyle;
	popLayer.innerHTML=sPop;

	popWidth=popLayer.clientWidth;
	popHeight=popLayer.clientHeight;
	if(event.clientX+12+popWidth>document.body.clientWidth) popLeftAdjust=-popWidth-24
		else popLeftAdjust=0;
	if(event.clientY+12+popHeight>document.body.clientHeight) popTopAdjust=-popHeight-24
		else popTopAdjust=0;
	popLayer.style.left=event.clientX+12+document.body.scrollLeft+popLeftAdjust;
	popLayer.style.top=event.clientY+12+document.body.scrollTop+popTopAdjust;
}
//title effect

//link effect
var rate = 20;
var obj;
var act = 0;
var elmH = 0;
var elmS = 128;
var elmV = 255;
var clrOrg;
var TimerID;
if (navigator.appName.indexOf("Microsoft",0) != -1 && parseInt(navigator.appVersion) >= 4) {
	Browser = true;
} else {
	Browser = false;
}
function doRainbow(){
	if (Browser && act != 1) {
		act = 1;
		obj = event.srcElement;
		clrOrg = obj.style.color;
		TimerID = setInterval("ChangeColor()",100);
	}
}
function stopRainbow(){
	if (Browser && act != 0) {
		obj.style.color = clrOrg;
		clearInterval(TimerID);
		act = 0;
	}
}
function doRainbowAnchor(){
if (Browser && act != 1) {
	obj = event.srcElement;
	while (obj.tagName != 'A' && obj.tagName != 'BODY') {
		obj = obj.parentElement;
		if (obj.tagName == 'A' || obj.tagName == 'BODY')
			break;
		}
		if (obj.tagName == 'A' && obj.href != '') {
			act = 1;
			clrOrg = obj.style.color;
			TimerID = setInterval("ChangeColor()",100);
		}
	}
}
function stopRainbowAnchor(){
	if (Browser && act != 0) {
		if (obj.tagName == 'A') {
			obj.style.color = clrOrg;
			clearInterval(TimerID);
			act = 0;
		}
	}
}
function ChangeColor(){
	obj.style.color = makeColor();
}
function makeColor(){
	if (elmS == 0) {
		elmR = elmV; elmG = elmV; elmB = elmV;
	} else {
		t1 = elmV;
		t2 = (255 - elmS) * elmV / 255;
		t3 = elmH % 60;
		t3 = (t1 - t2) * t3 / 60;
		if (elmH < 60) {
			elmR = t1; elmB = t2; elmG = t2 + t3;
		} else if (elmH < 120) {
			elmG = t1; elmB = t2; elmR = t1 - t3;
		} else if (elmH < 180) {
			elmG = t1; elmR = t2; elmB = t2 + t3;
		} else if (elmH < 240) {
			elmB = t1; elmR = t2; elmG = t1 - t3;
		} else if (elmH < 300) {
			elmB = t1; elmG = t2; elmR = t2 + t3;
		} else if (elmH < 360) {
			elmR = t1; elmG = t2; elmB = t1 - t3;
		} else {
			elmR = 0; elmG = 0; elmB = 0;
		}
	}
	elmR = Math.floor(elmR);
	elmG = Math.floor(elmG);
	elmB = Math.floor(elmB);
	clrRGB = '#' + elmR.toString(16) + elmG.toString(16) + elmB.toString(16);
	elmH = elmH + rate;
	if (elmH >= 360)elmH = 0;
	return clrRGB;
}
//link effect
document.onmouseover = effect;
function effect(){
	doRainbowAnchor();
	showPopupText();
}
document.onmouseout = stopRainbowAnchor;

/*
<SCR IPT FOR='window' EVENT='onload' LANGUAGE='JavaScript'>
picFun();
</scr ipt>
*/
