/**
 * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;


// JavaScript Document
var pageisIE=(navigator.appVersion.indexOf("MSIE")!=-1) ? true :false;
var pageisIE6=(navigator.appVersion.indexOf("MSIE 6")!=-1) ? true :false;
var pageisIE7=(navigator.appVersion.indexOf("MSIE 7")!=-1) ? true :false;
var pageisFF=(navigator.userAgent.indexOf("Firefox")>0)? true :false;
var pageisFF2=(navigator.userAgent.indexOf("Firefox/2")>0 || navigator.userAgent.indexOf("Firefox/1")>0)? true :false;
if (pageisIE6) document.execCommand("BackgroundImageCache", false, true);
var pjs=new Array();
var t_i=-1;

function pngtm(thisimg){
	if (thisimg.onload!=null) thisimg.onload=null;
	var i_w=thisimg.width;
	var i_h=thisimg.height;
	thisimg.style.filter+="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+thisimg.src+", sizingmethod=scale);";
	thisimg.src="images/tm.gif";
	thisimg.width=i_w;
	thisimg.height=i_h;
}
function mf(t_d,t_k,t_l){
	var t_m=(typeof(t_d)=="object")?t_d:document.getElementById(t_d);
	if (pageisFF2) {
		t_m.setAttribute(t_k,t_l);
	}else {
		switch (t_k) {
			case "onmouseover":with (t_m) onmouseover=new Function(t_l);break;
			case "onmouseout":with (t_m) onmouseout=new Function(t_l);break;
			case "onmousemove":with (t_m) onmousemove=new Function(t_l);break;
			case "onclick":with (t_m) onclick=new Function(t_l);break;
			case "onload":with (t_m) onload=new Function(t_l);break;
			case "onchange":with (t_m) onchange=new Function(t_l);break;
			case "onblur":with (t_m) onblur=new Function(t_l);break;
			case "onfocus":with (t_m) onfocus=new Function(t_l);break;
			case "onreset":with (t_m) onreset=new Function(t_l);break;
			case "onsubmit":with (t_m) onsubmit=new Function(t_l);break;
			case "ondblclick":with (t_m) ondblclick=new Function(t_l);break;
			case "onmousedown":with (t_m) onmousedown=new Function(t_l);break;
			case "onmouseup":with (t_m) onmouseup=new Function(t_l);break;
			case "onkeypress":with (t_m) onkeypress=new Function(t_l);break;
			case "onkeydown":with (t_m) onkeydown=new Function(t_l);break;
			case "onkeyup":with (t_m) onkeyup=new Function(t_l);break;
			case "onabort":with (t_m) onabort=new Function(t_l);break;
			case "onbeforeunload":with (t_m) onbeforeunload=new Function(t_l);break;
			case "onerror":with (t_m) onerror=new Function(t_l);break;
			case "onmove":with (t_m) onmove=new Function(t_l);break;
			case "onresize":with (t_m) onresize=new Function(t_l);break;
			case "onscroll":with (t_m) onscroll=new Function(t_l);break;
			case "onstop":with (t_m) onstop=new Function(t_l);break;
			case "onunload":with (t_m) onunload=new Function(t_l);break;
			case "onbounce":with (t_m) onbounce=new Function(t_l);break;
			case "onfinish":with (t_m) onfinish=new Function(t_l);break;
			case "onstart":with (t_m) onstart=new Function(t_l);break;
			case "onbeforecopy":with (t_m) onbeforecopy=new Function(t_l);break;
			case "onbeforecut":with (t_m) onbeforecut=new Function(t_l);break;
		}
	}
}
function mousex(ev) {
	ev = ev || event;
	return(ev.clientX);
}
function mousey(ev) {
	ev = ev || event;
	return(ev.clientY);
}

function tagif(t_d,t_k) {
	var tagname="";var tagclass="";var tagid="";
	if (t_k.indexOf("#")>=0) {
		tagname=t_k.substring(0,t_k.indexOf("#"));
		if (tagname.indexOf(".")>0) {
			tagclass=tagname.substring(tagname.indexOf(".")+1);
			tagname=tagname.substring(0,tagname.indexOf("."));
		}
		tagid=t_k.substring(t_k.indexOf("#")+1);
		if (tagid.indexOf(".")>0) {
			tagclass=tagid.substring(tagid.indexOf(".")+1);
			tagid=tagid.substring(0,tagid.indexOf("."));
		}
	} else if(t_k.indexOf(".")>=0){
		tagclass=t_k.substring(t_k.indexOf(".")+1);
		tagname=t_k.substring(0,t_k.indexOf("."));
	} else {
		tagname=t_k;
	}
	var tagnameif=(tagname=="")?true:((t_d.nodeName==tagname.toUpperCase())?true:false);
	var tagclassif=(tagclass=="")?true:(((" "+t_d.className+" ").indexOf(" "+tagclass+" ")>=0)?true:false);
	var tagidif=(tagid=="")?true:((t_d.id==tagid)?true:false);
	return((tagnameif && tagclassif && tagidif));
}
function newtag(t_d){
	var tagname="";var tagclass="";var tagid="";
	if (t_d.indexOf("#")>0) {
		tagname=t_d.substring(0,t_d.indexOf("#"));
		if (tagname.indexOf(".")>0) {
			tagclass=tagname.substring(tagname.indexOf(".")+1);
			tagname=tagname.substring(0,tagname.indexOf("."));
		}
		tagid=t_d.substring(t_d.indexOf("#")+1);
		if (tagid.indexOf(".")>0) {
			tagclass=tagid.substring(tagid.indexOf(".")+1);
			tagid=tagid.substring(0,tagid.indexOf("."));

		}
	} else if(t_d.indexOf(".")>0){
		tagclass=t_d.substring(t_d.indexOf(".")+1);
		tagname=t_d.substring(0,t_d.indexOf("."));
	} else {
		tagname=t_d;
	}
	var tagnew=document.createElement(tagname);
	if (tagclass!="") tagnew.className=tagclass;
	if (tagid!="") tagnew.id=tagid;
	return(tagnew);
}
function subif(t_d,t_k){
	var ifsub=false;
	var asub=t_d.getElementsByTagName("*");
	for (var j_s=0;j_s<asub.length;j_s++) {
		if(asub[j_s]==t_k) {
			ifsub=true;j_s=asub.length;
		}
	}
	return(ifsub);
}

function photo_auto_main(t_d,img_w,img_h,img_place){
	if (t_d.nodeName=="IMG") {
		if (t_d.complete) {
			photo_auto(t_d,img_w,img_h,img_place);
		} else {
			mf(t_d,"onload","photo_auto(this,"+img_w+","+img_h+",'"+img_place+"')");
		}
	} else {
		var anchorsub=t_d.getElementsByTagName("img");
		for (var j_j=0;j_j<anchorsub.length;j_j++) {
			if (anchorsub[j_j].complete) {
				photo_auto(anchorsub[j_j],img_w,img_h,img_place);
			} else {
				mf(anchorsub[j_j],"onload","photo_auto(this,"+img_w+","+img_h+",'"+img_place+"')");
			}
		}
	}
}
function photo_auto(thisimg,img_w,img_h,img_place){
	if (thisimg.onload!=null) thisimg.onload=null;
	var i_w=thisimg.width;
	var i_h=thisimg.height;
	if (img_w>0 && img_h>0) {
		if (i_w>=img_w) {
			if (i_h*img_w/i_w>=img_h){
				thisimg.style.width=parseInt(i_w*img_h/i_h)+"px";
				thisimg.style.height=img_h+"px";
				if (img_place=="center") thisimg.style.padding="0 "+parseInt((img_w-i_w*img_h/i_h)/2)+"px 0 "+(img_w-parseInt(i_w*img_h/i_h)-parseInt((img_w-i_w*img_h/i_h)/2))+"px";
			} else {
				thisimg.style.width=img_w+"px";
				thisimg.style.height=parseInt(i_h*img_w/i_w)+"px";
				if (img_place=="center") thisimg.style.padding=parseInt((img_h-i_h*img_w/i_w)/2)+"px 0 "+(img_h-parseInt(i_h*img_w/i_w)-parseInt((img_h-i_h*img_w/i_w)/2))+"px 0";
			}
		} else {
			if (i_h>=img_h) {
				thisimg.style.height=img_h+"px";
				thisimg.style.width=parseInt(i_w*img_h/i_h)+"px";
				if (img_place=="center") thisimg.style.padding="0 "+parseInt((img_w-i_w*img_h/i_h)/2)+"px 0 "+(img_h-parseInt(i_w*img_h/i_h)-parseInt((img_w-i_w*img_h/i_h)/2))+"px";
			} else {
				if (img_place=="center") thisimg.style.padding=parseInt((img_h-i_h)/2)+"px "+parseInt((img_w-i_w)/2)+"px "+(img_h-i_h-parseInt((img_h-i_h)/2))+"px "+(img_w-i_w-parseInt((img_w-i_w)/2))+"px";
			}
		}
	} else {
		if (img_w<1) {
			if (i_h>img_h) {
				thisimg.style.width=parseInt(i_w*img_h/i_h)+"px";
				thisimg.style.height=img_h+"px";
			} else {
				if (img_place=="center") thisimg.style.padding=parseInt((img_h-i_h)/2)+"px 0px "+(img_h-i_h-parseInt((img_h-i_h)/2))+"px";
			}
		} else {
			if (i_w>img_w) {
				thisimg.style.height=parseInt(i_h*img_w/i_w)+"px";
				thisimg.style.width=img_w+"px";
			} else {
				if (img_place=="center") thisimg.style.padding="0px "+parseInt((img_w-i_w)/2)+"px 0px "+(img_w-i_w-parseInt((img_w-i_w)/2))+"px";
			}
		}
	}
	if (pageisIE6 && thisimg.src.toUpperCase().substring(thisimg.src.toUpperCase().length-3,thisimg.src.toUpperCase().length)=="PNG") pngtm(thisimg);
}

function addnode(t_d,t_w,t_p,t_n){
	var anchorsub=t_d.getElementsByTagName("*");
	for (var j_j=0; j_j<anchorsub.length; j_j++) {
		if (tagif(anchorsub[j_j],t_w)) {
			switch (t_p) {
				case "start":
					if (anchorsub[j_j].firstChild) {
						anchorsub[j_j].insertBefore(newtag(t_n),anchorsub[j_j].firstChild);
					} else {
						anchorsub[j_j].appendChild(newtag(t_n));
					}
				break;
				case "before":anchorsub[j_j].parentNode.insertBefore(newtag(t_n),anchorsub[j_j]);break;
				case "after":
					if (anchorsub[j_j].nextSibling) {
						anchorsub[j_j].parentNode.insertBefore(newtag(t_n),anchorsub[j_j].nextSibling);
					} else {
						anchorsub[j_j].parentNode.appendChild(newtag(t_n));
					}
				break;nextSibling
				default:anchorsub[j_j].appendChild(newtag(t_n));
			}
		}
	}
}

var befornavid=new Array();
function befornav(t_d,t_k){
	if (!t_d.id) t_d.id=t_k;
	befornavid[befornavid.length]=t_d.id;
	befornavid[befornavid.length]=t_k;
}
function pagenav(t_d){
	if (!t_d.getElementsByTagName("a")) return;
	var anchornav=t_d.getElementsByTagName("a");
	for (var j_m=0;j_m<befornavid.length/2;j_m++) {
		var anchorsub=document.getElementById(befornavid[2*j_m]).getElementsByTagName("li");
		for (var j_l=(anchornav.length-1);j_l>=0;j_l--) {
			for (var j_j=0;j_j<anchorsub.length;j_j++) {
				var anchorsuba=anchorsub[j_j].getElementsByTagName("a");
				for (var j_k=0;j_k<anchorsuba.length;j_k++) {
					if (anchorsuba[j_k].href==anchornav[j_l].href) {
						if (anchorsub[j_j].className.indexOf(" current")<0) {
							anchorsub[j_j].className+=" current";
							/*if (befornavid[2*j_m+1]!="menu")*/ j_l=-1;
							j_k=anchorsuba.length;
							j_j=anchorsub.length;
						}
					}
				}
			}
		}
	}
}

function menu_main(t_d,t_k){
	var anchorsub=t_d.getElementsByTagName("*");
	for (var j_j=0;j_j<anchorsub.length;j_j++) {
		if (tagif(anchorsub[j_j],t_k)) {
			mf(anchorsub[j_j],"onmouseover","menu(this,'on')");
			mf(anchorsub[j_j],"onmouseout","menu(this,'out')");
		}
	}
}
function menu(t_j,t_k) {
	if (t_k=="on") {
		if (t_j.className.indexOf(" mouseon")<0) t_j.className+=" mouseon";
	} else {
		if (t_j.className.indexOf(" mouseon")>=0) t_j.className=t_j.className.substring(0,t_j.className.indexOf(" mouseon"));
	}
}

function mshow_main(t_d,t_k,d_container,d_show){
	t_i++;
	pjs[t_i]=new Array();
	var anchorsub=t_d.getElementsByTagName("*");
	var j_l=0;var j_m=-1;
	for (var j_j=0; j_j<anchorsub.length; j_j++) {
		if (tagif(anchorsub[j_j],d_container)){
			mf(anchorsub[j_j],"onmouseover","menu(this,'on')");
			mf(anchorsub[j_j],"onmouseout","menu(this,'out')");
			j_m=j_j;
		} else if (tagif(anchorsub[j_j],d_show)){
			if (j_m>=0) {
				if (subif(anchorsub[j_m],anchorsub[j_j])){
					j_l++;
					if (!anchorsub[j_j].id) anchorsub[j_j].id="pjs"+t_i+"_"+(5*j_l+1);
					pjs[t_i][5*j_l+1]=anchorsub[j_j].id;
					if (!anchorsub[j_m].id) anchorsub[j_m].id="pjs"+t_i+"_"+(5*j_l);
					pjs[t_i][5*j_l]=anchorsub[j_m].id;
					anchorsub[j_j].style.visibility="visible";
					pjs[t_i][5*j_l+4]=anchorsub[j_j].clientHeight;
					anchorsub[j_j].style.visibility="hidden";
					mf(anchorsub[j_m],"onmouseover","mshow("+t_i+","+j_l+",'on',"+t_k+")");
					mf(anchorsub[j_m],"onmouseout","mshow("+t_i+","+j_l+",'out',"+t_k+")");
					j_m=-1;	
				}
			}
		}
	}
}
function mshow(t_j,t_k,t_l,t_m) {
	var c_b=document.getElementById(pjs[t_j][5*t_k+1]);
	var c_a=document.getElementById(pjs[t_j][5*t_k]);
	if (t_l=="on") {
		if (c_a.className.indexOf(" mouseon")<0){
			clearInterval(pjs[t_j][5*t_k+3]);
			c_a.className+=" mouseon";
			pjs[t_j][1]=pjs[t_j][5*t_k+4]+100;
			c_b.style.height="0px";
			c_b.scrollTop=pjs[t_j][5*t_k+4];
			c_b.style.visibility="visible";
			c_b.style.overflow="hidden";
			pjs[t_j][5*t_k+3]=setInterval("mshow_h("+t_j+","+t_k+","+t_m+")",20);
		} else {
			clearTimeout(pjs[t_j][5*t_k+2]);
		}
	} else {
		if (c_a.className.indexOf(" mouseon")>=0){
			pjs[t_j][5*t_k+2]=setTimeout("mshow_c("+t_j+","+t_k+","+t_m+")",10);
		}
	}
}
function mshow_h(t_j,t_k,t_l) {
	var c_b=document.getElementById(pjs[t_j][5*t_k+1]);
	pjs[t_j][1]=pjs[t_j][1]-10;
	if (pjs[t_j][1]>=0) {
		if (pjs[t_j][1]<pjs[t_j][5*t_k+4]) {
			c_b.style.height=(pjs[t_j][5*t_k+4]-pjs[t_j][1])+"px";
			c_b.scrollTop=pjs[t_j][1];
		}
	} else {
		c_b.scrollTop=0;
		c_b.style.height="auto";
		c_b.style.overflow="visible";
		clearInterval(pjs[t_j][5*t_k+3]);
	}
}
function mshow_c(t_j,t_k,t_l){
	var c_b=document.getElementById(pjs[t_j][5*t_k+1]);
	var c_a=document.getElementById(pjs[t_j][5*t_k]);
	if (c_a.className.indexOf(" mouseon")>=0) c_a.className=c_a.className.substring(0,c_a.className.indexOf(" mouseon"));
	clearInterval(pjs[t_j][5*t_k+3]);
	if (t_l==0) {
		pjs[t_j][0]=c_b.clientHeight;
		c_b.style.overflow="hidden";
		c_b.scrollTop=pjs[t_j][5*t_k+4]-pjs[t_j][0];
		pjs[t_j][5*t_k+3]=setInterval("mshow_d("+t_j+","+t_k+","+t_l+")",30);
	} else{
		c_b.style.visibility="hidden";
	}
}
function mshow_d(t_j,t_k,t_l) {
	var c_b=document.getElementById(pjs[t_j][5*t_k+1]);
	pjs[t_j][0]=pjs[t_j][0]-10;
	if (pjs[t_j][0]>0) {
		c_b.style.height=pjs[t_j][0]+"px";
		c_b.style.overflow="hidden";
		c_b.scrollTop=pjs[t_j][5*t_k+4]-pjs[t_j][0];
	} else {
		c_b.style.visibility="hidden";
		clearInterval(pjs[t_j][5*t_k+3]);
	}
}

function slidingdoor_main(t_d,t_k,d_container,d_title,d_btn){
	t_i++;
	pjs[t_i]=new Array(); var t_l=0; var t_m=-1;var btn=t_d;var la_c=0;pjs[t_i][0]=0;
	var la=(thislocation.lastIndexOf("#")>0)?thislocation.substring(thislocation.lastIndexOf("#")+1):"";
	var anchorsub=t_d.getElementsByTagName("*");
	var slidingtil=newtag("ul.slidingdoor_title");
	for (var j_j=0; j_j<anchorsub.length; j_j++) {
		if (tagif(anchorsub[j_j],d_container)){
			t_m=j_j;
		} else if (tagif(anchorsub[j_j],d_title)){
			if (t_m>=0) {
				if (subif(anchorsub[t_m],anchorsub[j_j])){
					t_l++;
					if (!anchorsub[t_m].id) anchorsub[t_m].id="pjs"+t_i+"_"+(2*t_l);
					if (!!anchorsub[j_j].id && la!="") {
						if (anchorsub[j_j].id==la) la_c=t_l;
					}
					pjs[t_i][2*t_l]=anchorsub[t_m].id;
					pjs[t_i][2*t_l+1]="pjs"+t_i+"_"+(2*t_l+1);
					var newli=newtag("li#"+pjs[t_i][2*t_l+1]);
					if (anchorsub[t_m].className.indexOf("sliding_on")>=0) {
						anchorsub[t_m].className=anchorsub[t_m].className.substring(0,anchorsub[t_m].className.indexOf("sliding_on"))+anchorsub[t_m].className.substring(anchorsub[t_m].className.indexOf("sliding_on")+10)+" sliding_on";
						newli.className="slidingbtn"+t_l+" current";
						pjs[t_i][0]=t_l;
					} else {
						newli.className="slidingbtn"+t_l;
					}
					newli.innerHTML=anchorsub[j_j].innerHTML;
					slidingtil.appendChild(newli);
					mf(newli,t_k,"slidingdoor("+t_i+","+t_l+")");
					t_m=-1;
				}
			}
		} else if (d_btn!=undefined && tagif(anchorsub[j_j],d_btn)) {
			btn=anchorsub[j_j];
		}
	}
	if (!!btn.firstChild) {
		btn.insertBefore(slidingtil,btn.firstChild);
	} else {
		btn.appendChild(slidingtil);
	}
	if (pjs[t_i][0]==0) slidingdoor(t_i,1);
	if (la_c!=0) slidingdoor(t_i,la_c);
}
function slidingdoor(t_d,t_l){
	if (t_l!=pjs[t_d][0]) {
		if (pjs[t_d][0]>0) {
			var c_a_o=document.getElementById(pjs[t_d][2*pjs[t_d][0]]);
			var c_b_o=document.getElementById(pjs[t_d][2*pjs[t_d][0]+1]);
			if (c_a_o.className.indexOf(" sliding_on")>=0) {
				c_a_o.className=c_a_o.className.substring(0,c_a_o.className.indexOf(" sliding_on"));
				c_b_o.className=c_b_o.className.substring(0,c_b_o.className.indexOf(" current"));
			}	
		}
		document.getElementById(pjs[t_d][2*t_l]).className+=" sliding_on";
		document.getElementById(pjs[t_d][2*t_l+1]).className+=" current";
		pjs[t_d][0]=t_l;
	}
}
function nostyle(t_d){
	var anchorsub=t_d.getElementsByTagName("*");
	for (var j_j=0; j_j<anchorsub.length; j_j++) {
		anchorsub[j_j].style.cssText="";
	}
}
function nocss(t_d){
	var anchorsub=t_d.getElementsByTagName("*");
	for (var j_j=0; j_j<anchorsub.length; j_j++) {
		anchorsub[j_j].style.className="";
	}
}

function content_main(t_d,t_k,t_l){
	var anchorsub=t_d.getElementsByTagName("*");
	for (var j_j=0; j_j<anchorsub.length; j_j++) {
		if(t_k=="nostyle") anchorsub[j_j].style.cssText="";
		if (anchorsub[j_j].nodeName=="IMG" || anchorsub[j_j].nodeName=="TABLE") {
			if (anchorsub[j_j].border!="0") {
				if (anchorsub[j_j].nodeName=="IMG" && t_l>0) photo_auto_main(anchorsub[j_j],(t_d.clientWidth-t_l),0,'nocenter');
				anchorsub[j_j].className+=" haveborder";
			} else {
				if (anchorsub[j_j].nodeName=="IMG" && t_l>0) photo_auto_main(anchorsub[j_j],t_d.clientWidth,0,'nocenter');
			}
			if (anchorsub[j_j].align=="right") anchorsub[j_j].style.marginLeft="3em";
			if (anchorsub[j_j].align=="left") anchorsub[j_j].style.marginRight="3em";
		}
	}
}

function photo_change_main(t_d,t_k,t_l){
	t_i++;
	pjs[t_i]=new Array();var btn="";var j_k=0;
	var anchorsub=t_d.getElementsByTagName("li");
	for (var j_j=0; j_j<anchorsub.length; j_j++) {
		if (!!anchorsub[j_j].getElementsByTagName("img")) {
			j_k++;
			pjs[t_i][j_k]=anchorsub[j_j];
			anchorsub[j_j].style.position="absolute";
			anchorsub[j_j].style.left="0";
			var imgsrc=""+anchorsub[j_j].getElementsByTagName("img")[0].src;
			if(t_k!=undefined && t_l!=undefined) imgsrc=imgsrc.split(t_k).join(t_l);
			if (j_k==1) {
				pjs[t_i][0]=anchorsub[j_j].clientHeight;
				anchorsub[j_j].style.top="0";
				btn+="<a href=\"javascript:photo_change("+t_i+","+j_k+")\" class=\"current\" id=\"pjs"+t_i+"_"+j_k+"\"><img src=\""+imgsrc+"\" /></a>";
			} else {
				anchorsub[j_j].style.top=pjs[t_i][0]+"px";
				btn+="<a href=\"javascript:photo_change("+t_i+","+j_k+")\" id=\"pjs"+t_i+"_"+j_k+"\"><img src=\""+imgsrc+"\" /></a>";
			}
		}
	}
	var photo_btn=newtag("div.photo_btn");
	photo_btn.innerHTML=btn;
	t_d.appendChild(photo_btn);
}
function photo_change(t_d,t_k){
	for (var j_j=1; j_j<pjs[t_d].length; j_j++) {
		pjs[t_d][j_j].style.top=pjs[t_d][0]+"px";
		document.getElementById("pjs"+t_d+"_"+j_j).className="";
	}
	pjs[t_d][t_k].style.top="0";
	document.getElementById("pjs"+t_d+"_"+t_k).className="current";
}

function outspread_main(t_d,t_k,t_l,d_container,d_btn){
	t_i++;var j_l=0;var t_m=0;
	pjs[t_i]=new Array();pjs[t_i][0]=0;
	var anchorsub=t_d.getElementsByTagName("*");
	for (var j_j=0; j_j<anchorsub.length; j_j++) {
		if (tagif(anchorsub[j_j],d_container)){
			t_m=j_j;
		} else if (tagif(anchorsub[j_j],d_btn)){
			if (subif(anchorsub[t_m],anchorsub[j_j])){
				j_l++;
				if (!anchorsub[t_m].id) anchorsub[t_m].id="pjs"+t_i+"_"+j_l;
				pjs[t_i][j_l]=anchorsub[t_m].id;
				if (t_l=="open_all" && anchorsub[t_m].className.indexOf("outspread_open")<0) anchorsub[t_m].className+=" outspread_open";
				if(j_l==1 && t_l=="open_frist" && anchorsub[t_m].className.indexOf("outspread_open")<0) {
					anchorsub[t_m].className+=" outspread_open";
					pjs[t_i][0]=1;
				}
				mf(anchorsub[j_j],"onmousemove","menu(this,'on')");
				mf(anchorsub[j_j],"onmouseout","menu(this,'out')");
				mf(anchorsub[j_j],"onclick","outspread("+t_i+","+j_l+",'"+t_k+"')");
			}
		}
	}
}
function outspread(t_j,t_k,t_l){
	var m_c=document.getElementById(pjs[t_j][t_k]);
	if (m_c.className.indexOf(" outspread_open")>=0) {
		m_c.className=m_c.className.substring(0,m_c.className.indexOf(" outspread_open"));
	} else {
		m_c.className+=" outspread_open";
		if (t_l=="close_other"&& pjs[t_j][0]!=0) {
			var m_o=document.getElementById(pjs[t_j][pjs[t_j][0]]);
			if (t_k!=pjs[t_j][0] && m_o.className.indexOf(" outspread_open")>=0) {
				m_o.className=m_o.className.substring(0,m_o.className.indexOf(" outspread_open"));
			}
		}
		pjs[t_j][0]=t_k;
	}
}

function scroll_main(t_d,t_type,d_container,d_content,d_v,d_t){
	t_i++;
	pjs[t_i]=new Array();
	pjs[t_i][0]=1;pjs[t_i][1]=0;pjs[t_i][2]=0;pjs[t_i][6]=(d_t!=undefined)?d_t:0;pjs[t_i][7]=0;pjs[t_i][8]=0;pjs[t_i][9]=0;
	var s_c;var s_m;
	var anchorsub=t_d.getElementsByTagName("*");
	for (var j_j=0; j_j<anchorsub.length; j_j++) {
		if (tagif(anchorsub[j_j],d_container)){
			s_c=anchorsub[j_j];
			if (!s_c.id) s_c.id="pjs"+t_i;
			pjs[t_i][4]=s_c.id;
		} else if (tagif(anchorsub[j_j],d_content)){
			s_m=anchorsub[j_j];
		}
	}
	if (t_type=="left") {
		pjs[t_i][9]=s_c.clientWidth;
		s_m.style.position="absolute";
		pjs[t_i][3]=s_m.clientWidth;
		s_m.style.position="relative";
		
	} else {
		pjs[t_i][9]=s_c.clientHeight;
		pjs[t_i][3]=s_m.clientHeight;
	}
	if (pjs[t_i][9]<pjs[t_i][3]) {
		if(pjs[t_i][6]==0) {
			var newa1=newtag("a.scroll_move_1");
			t_d.appendChild(newa1);
			var newa2=newtag("a.scroll_move_2");
			t_d.appendChild(newa2);
		}
		var copytimes=parseInt(pjs[t_i][9]/pjs[t_i][3])+1;
		s_m.style.display="block";
		s_m.className+=" scrollclass";
		s_m.style.width=2*(copytimes+1)*pjs[t_i][3]+"px";
		var scroll_c=s_m.innerHTML;
		for (var j_k=0;j_k<2*copytimes;j_k++){
			s_m.innerHTML+=scroll_c;
		}
		mf(s_c,"onmousemove","scroll_stop("+t_i+",1)");
		mf(s_c,"onmouseout","scroll_stop("+t_i+",0);");
		if(pjs[t_i][6]==0) {
			mf(newa1,"onmousedown","scroll_moveto("+t_i+",8)");
			mf(newa2,"onmousedown","scroll_moveto("+t_i+",-8)");
			mf(newa1,"onmouseup","scroll_moveto("+t_i+",1)");
			mf(newa2,"onmouseup","scroll_moveto("+t_i+",-1)");
		}
		pjs[t_i][5]=setInterval("scroll_todo("+t_i+",'"+t_type+"')",(d_v!=undefined)?d_v:30);
	}
}
function scroll_moveto(t_j,t_k) {
	pjs[t_j][0]=t_k;
}
function scroll_stop(t_j,t_k) {
	pjs[t_j][2]=t_k;
}
function scroll_todo(t_j,t_k){
	if(pjs[t_j][6]==0) {
		if (pjs[t_j][2]==0) {
			pjs[t_j][1]=pjs[t_j][1]+pjs[t_j][0];
			if (2*pjs[t_j][3]-pjs[t_j][1]<0) {
				pjs[t_j][1]=pjs[t_j][1]-2*pjs[t_j][3];
			} else {
				if (pjs[t_j][1]<0) pjs[t_j][1]=2*pjs[t_j][3]-pjs[t_j][1];
			}
			if (t_k=="left") {
				document.getElementById(pjs[t_j][4]).scrollLeft=pjs[t_j][1];
			} else {
				document.getElementById(pjs[t_j][4]).scrollTop=pjs[t_j][1];
			}
		}
	} else {
		if (pjs[t_j][2]==0 || pjs[t_j][8]<=pjs[t_j][9]) {
			pjs[t_j][8]++;
			if (pjs[t_j][8]<=pjs[t_j][9]) {
				pjs[t_j][1]=pjs[t_j][1]+pjs[t_j][0];
				if (2*pjs[t_j][3]-pjs[t_j][1]<0) {
					pjs[t_j][1]=pjs[t_j][1]-2*pjs[t_j][3];
				} else {
					if (pjs[t_j][1]<0) pjs[t_j][1]=2*pjs[t_j][3]-pjs[t_j][1];
				}
				if (t_k=="left") {
					document.getElementById(pjs[t_j][4]).scrollLeft=pjs[t_j][1];
				} else {
					document.getElementById(pjs[t_j][4]).scrollTop=pjs[t_j][1];
				}
			} else {
				if(pjs[t_j][8]>pjs[t_j][9]+pjs[t_j][6]) pjs[t_j][8]=0;
			}
		}
	}
}


function tonewlayer() {
	var newnote1=newtag("div#newlayer");
	document.body.insertBefore(newnote1,document.body.firstChild);
	var newnote=newtag("div.layer_bg");
	newnote1.appendChild(newnote);
	newnote=newtag("div.layer_place");
	newnote1.appendChild(newnote);
	newnote=newtag("div#layer_content");
	newnote1.appendChild(newnote);
	newnote.innerHTML+="<iframe id=\"layer_iframe\" name=\"layer_iframe\" src=\"about:blank;\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\"></iframe>";
	for (var i=0;i<10;i++) {
		newnote1=newtag("div#sublayer"+i);
		newnote.appendChild(newnote1);
	}
	newlayerplace();
	window.onscroll=newlayerplace;
	window.onresize=newlayerplace;
}
function newlayerplace() {
	var c_w=document.documentElement.clientWidth;
	var c_h=document.documentElement.clientHeight;
	var st=(document.body.scrollTop>0)?document.body.scrollTop:document.documentElement.scrollTop;
	var layerstyle=document.getElementById("newlayer").style;
	layerstyle.width=(c_w>1000)?c_w+"px":"1000px";
	if (c_h>600) {
		layerstyle.height=c_h+"px";
		layerstyle.top=st+"px";
	} else {
		layerstyle.height="600px";
		if (st>600-c_h) layerstyle.top=(st-600+c_h)+"px";
	}
}
function newlayer_open() {
	var layerstyle=document.getElementById("newlayer").style;
	layerstyle.zIndex=50;
	layerstyle.display="block";
	if (pageisIE6) {
		var noselect=document.getElementsByTagName("select");
		for (var noselect_i=0; noselect_i<noselect.length; noselect_i++) {
			noselect[noselect_i].style.visibility="hidden";
		}
	}
}
function newlayer_close() {
	var layerstyle=document.getElementById("newlayer").style;
	layerstyle.display="none";
	layerstyle.zIndex=1;
	document.getElementById("sublayer0").innerHTML="";
	document.getElementById("sublayer5").innerHTML="";
	if (pageisIE6) {
		var noselect=document.getElementsByTagName("select");
		for (var noselect_i=0; noselect_i<noselect.length; noselect_i++) {
			noselect[noselect_i].style.visibility="inherit";
		}
	}
}
function tonewlayer_main(t_d,thistype,thisdload,thiswidth,thisheight){
	if (!document.getElementById("newlayer")) tonewlayer();
	var t_w=(thiswidth!=undefined)?thiswidth:540;
	var t_h=(thisheight!=undefined)?thisheight:150;
	var t_dl=(thisdload!=undefined)?thisdload:"";
	var t_type=(thistype!=undefined)?thistype:"";
	var s0=document.getElementById("sublayer0");
	var s5=document.getElementById("sublayer5");
	s0.style.cssText="width:"+t_w+"px;height:"+t_h+"px;";
	if (t_type=="") {
		if (typeof(t_d)=="object") s0.innerHTML=t_d.innerHTML;
		if (typeof(t_d)=="string") s0.innerHTML=document.getElementById(t_d).innerHTML;
		s5.innerHTML="<a class=\"btn_determine\" onclick=\"newlayer_close()\">&#30830;&#23450;</a>";
	} else {
		switch (t_type) {
			case "id":
				s0.innerHTML=document.getElementById(t_d).innerHTML;
			break;
			case "iframe":
				if (pageisFF) {
					s0.innerHTML="<iframe id=\"tonewlayer_iframe\" name=\"tonewlayer_iframe\" src=\""+t_d+"\" width=\""+t_w+"\" height=\""+t_h+"\" frameborder=\"0\" allowTransparency=\"true\" scrolling=\"no\"></iframe>";
				} else {
					s0.innerHTML="<iframe id=\"tonewlayer_iframe\" name=\"tonewlayer_iframe\" src=\"about:blank;\" width=\""+t_w+"\" height=\""+t_h+"\" frameborder=\"0\" allowTransparency=\"true\" scrolling=\"no\"></iframe>";
					window.frames["tonewlayer_iframe"].location.href=t_d;
				}
			break;
			case "wallpaper":
				s0.innerHTML="<img src=\""+t_d+"\" width=\""+t_w+"\" height=\""+t_h+"\" />";
			break;
			case "img":
				s0.style.cssText="width:"+(t_w+20)+"px;height:"+t_h+"px;overflow:auto;"
				s0.innerHTML="<img src=\""+t_d+"\" width=\""+t_w+"\" />";
			break;
			case "swf":
			var nl = new SWFObject(t_d,"",t_w,t_h,"9,0,28,0");
				nl.addParam("wmode","opaque");
				if (t_d.indexOf("/")>0) nl.addParam("base",t_d.substring(0,t_d.lastIndexOf("/")+1));
				nl.addParam("allowfullScreen","true");
				nl.addParam("scale", "noscale");
				nl.write("sublayer0");
				if (t_dl!="") {
					var newnote=newtag("a.btn_download");
					newnote.href=thisdload;
					newnote.target="_blank";
					newnote.innerHTML="&#19979;&#36733;";
					s0.appendChild(newnote);
				}
				if (thistxt!="") s5.innerHTML+=thistxt;
			break;
			case "flv":
				s0.style.cssText="width:"+t_w+"px;height:"+(t_h+20)+"px;overflow:auto;"
				var nl = new SWFObject("player.swf", "",t_w,t_h+20, "9,0,28,0", "#000000");
				nl.addParam("wmode", "opaque");
				nl.addParam("allowfullScreen", "true");
				nl.addParam("scale", "noscale");
	
				nl.addVariable("autostart", "true");
				nl.addVariable("frontcolor", "#000000");
				nl.addVariable("height",t_h);
				nl.addVariable("width", t_w);
				nl.addVariable("file", t_d);
				nl.write("sublayer5");
				if (t_dl!="") {
					var newnote=newtag("a.btn_download");
					newnote.href=thisdload;
					newnote.target="_blank";
					newnote.innerHTML="&#19979;&#36733;";
					s0.appendChild(newnote);
				}
				if (thistxt!="") s5.innerHTML+=thistxt;
			break;
		}
		s5.innerHTML+=(t_dl!="")?"<a href=\""+thisdload+"\" target=\"_blank\" class=\"btn_download\">&#19979;&#36733;</a>":"";
		s5.innerHTML+="<a class=\"btn_close\" onclick=\"newlayer_close()\">close</a>";
	}
	newlayer_open();
	document.getElementById("layer_content").style.height=s0.offsetHeight+"px";
	document.getElementById("layer_content").style.width=s0.offsetWidth+"px";
}

function scrollcontent_main(t_d,t_t,t_m,t_s,t_ss){
	t_i++;
	pjs[t_i]=new Array();pjs[t_i][0]=0;pjs[t_i][5]=0;pjs[t_i][7]=1;var s_m;
	var anchorsub=t_d.getElementsByTagName("*");
	for (var j_j=0; j_j<anchorsub.length; j_j++) {
		if (tagif(anchorsub[j_j],t_m)){
			s_m=anchorsub[j_j];
			j_j=anchorsub.length;
		}
	}
	if (pageisFF2) s_m.className+=" ff2";
	if (!s_m.id) s_m.id="pjs"+t_i;
	pjs[t_i][1]=s_m.id;
	pjs[t_i][2]=(t_t==1 || t_t==3)?s_m.clientWidth:s_m.clientHeight;
	var asub=s_m.getElementsByTagName("li");
	pjs[t_i][3]=(t_t==1 || t_t==3)?asub[0].clientWidth:asub[0].clientHeight;
	pjs[t_i][4]=pjs[t_i][3]*asub.length;
	if (pjs[t_i][2]<pjs[t_i][4]) {
		var page_up=newtag("a.page_up");
		var page_dn=newtag("a.page_dn");
		s_m.parentNode.insertBefore(page_up,s_m);
		s_m.parentNode.insertBefore(page_dn,s_m);
		mf(page_up,"onclick","scrollcontent("+t_i+","+t_t+",-1,"+t_s+","+t_ss+")");
		mf(page_dn,"onclick","scrollcontent("+t_i+","+t_t+",1,"+t_s+","+t_ss+")");
		mf(t_d,"onmouseover","scrollcontent_stop("+t_i+","+t_t+",0,"+t_s+","+t_ss+")");
		mf(t_d,"onmouseout","scrollcontent_stop("+t_i+","+t_t+",1,"+t_s+","+t_ss+")");
		s_m.innerHTML=s_m.innerHTML+s_m.innerHTML+s_m.innerHTML;
		pjs[t_i][8]=setTimeout("scrollcontent("+t_i+","+t_t+",1,"+t_s+","+t_ss+")",t_ss);
	}
	s_m.style.visibility="visible";
}
function scrollcontent_stop(t_d,t_t,t_m,t_s,t_ss){
	clearTimeout(pjs[t_d][8]);
	pjs[t_d][7]=t_m;
	if (t_m==1 && pjs[t_d][5]==0) pjs[t_d][8]=setTimeout("scrollcontent("+t_d+","+t_t+",1,"+t_s+","+t_ss+")",t_ss);
}
function scrollcontent(t_d,t_t,t_m,t_s,t_ss){
	clearTimeout(pjs[t_d][8]);
	if (pjs[t_d][5]==0) {
		pjs[t_d][5]=1;
		scrollcontent_goto(t_d,t_t,t_m*((t_t<3)?pjs[t_d][2]:pjs[t_d][3]),t_s,t_ss);
	}
}

function scrollcontent_goto(t_d,t_t,t_m,t_s,t_ss){
	if (t_m>0) {
		if (t_m>t_s) {
			t_m=t_m-t_s;
			pjs[t_d][0]+=t_s;
		} else {
			pjs[t_d][0]+=t_m;
			t_m=0;
		}
	} else {
		if (t_m+t_s<0) {
			t_m=t_m+t_s;
			pjs[t_d][0]-=t_s;
		} else {
			pjs[t_d][0]+=t_m;
			t_m=0;
		}
	}
	if (2*pjs[t_d][4]-pjs[t_d][0]<0) {
		pjs[t_d][0]=pjs[t_d][0]-2*pjs[t_d][4];
	} else {
		if (pjs[t_d][0]<0) pjs[t_d][0]=2*pjs[t_d][4]+pjs[t_d][0];
	}
	if (t_t==1 || t_t==3) {
		document.getElementById(pjs[t_d][1]).scrollLeft=pjs[t_d][0];
	} else {
		document.getElementById(pjs[t_d][1]).scrollTop=pjs[t_d][0];
	}
	if (t_m!=0) {
		pjs[t_d][6]=setTimeout("scrollcontent_goto("+t_d+","+t_t+","+t_m+","+t_s+","+t_ss+")",30);
	} else {
		pjs[t_d][5]=0;
		if (pjs[t_d][7]==1) pjs[t_i][8]=setTimeout("scrollcontent("+t_d+","+t_t+",1,"+t_s+","+t_ss+")",t_ss);
	}
}

function movenote(t_d,t_s,t_t,t_m){
	var s_s;var s_m;
	var anchorsub=t_d.getElementsByTagName("*");
	for (var j_j=0; j_j<anchorsub.length; j_j++) {
		if (tagif(anchorsub[j_j],t_s)) s_s=anchorsub[j_j];
		if (tagif(anchorsub[j_j],t_m)) s_m=anchorsub[j_j];
	}
	if (t_t=="before") {
		if (s_m.firstChild) {
			s_m.insertBefore(s_s,s_m.firstChild);
		} else {
			s_m.appendChild(s_s);
		}
	} else {
		s_m.appendChild(s_s);
	}
}

function tshow_main(t_d,t_step,t_t){
	t_i++;
	pjs[t_i]=new Array();
	if (!t_d.id) t_d.id="pjs"+t_i;
	pjs[t_i][0]=t_d.id;
	t_d.style.cssText="height:auto;width:auto;border:0;";
	pjs[t_i][2]=t_d.clientHeight;
	pjs[t_i][4]=t_d.clientWidth;
	t_d.style.cssText="height:auto;width:auto;padding:0;border:0;";
	pjs[t_i][2]=2*t_d.clientHeight-pjs[t_i][2];
	pjs[t_i][4]=2*t_d.clientWidth-pjs[t_i][4];
	mf(t_d,"onmouseover","tshow("+t_i+","+t_step+",'on')");
	mf(t_d,"onmouseout","tshow("+t_i+","+t_step+",'out')");
	if (t_t=="open" || t_t=="toclose") {
		pjs[t_i][3]=pjs[t_i][2];
		pjs[t_i][5]=pjs[t_i][4];
		t_d.style.cssText="height:"+pjs[t_i][3]+"px;width:"+pjs[t_i][5]+"px;";
		t_d.className+=" tshow_on"
		if (t_t=="toclose") tshow(t_i,t_step,'out');
	} else {
		pjs[t_i][3]=0;
		pjs[t_i][5]=0;
		t_d.style.cssText="height:"+pjs[t_i][3]+"px;width:"+pjs[t_i][5]+"px;";
		if (t_t=="toopen") tshow(t_i,t_step,'on');
	}
}
function tshow(t_d,t_step,t_t){
	clearInterval(pjs[t_d][1]);
	if (t_t=='on') {
		pjs[t_d][1]=setInterval("tshow_o("+t_d+","+t_step+")",10);
	} else {
		pjs[t_d][1]=setInterval("tshow_c("+t_d+","+t_step+")",10);
	}
}
function tshow_o(t_d,t_step){
	if (document.getElementById(pjs[t_d][0]).className.indexOf(" tshow_on")<0) document.getElementById(pjs[t_d][0]).className+= " tshow_on";
	pjs[t_d][3]=pjs[t_d][3]+pjs[t_d][2]/t_step;
	pjs[t_d][5]=pjs[t_d][5]+pjs[t_d][4]/t_step;
	if (pjs[t_d][3]>pjs[t_d][2]) pjs[t_d][3]=pjs[t_d][2];
	if (pjs[t_d][5]>pjs[t_d][4]) pjs[t_d][5]=pjs[t_d][4];
	document.getElementById(pjs[t_d][0]).style.cssText="height:"+parseInt(pjs[t_d][3])+"px;width:"+parseInt(pjs[t_d][5])+"px;";
	if (pjs[t_d][3]==pjs[t_d][2] && pjs[t_d][5]==pjs[t_d][4]) {
		clearInterval(pjs[t_d][1]);
	}
}
function tshow_c(t_d,t_step){
	pjs[t_d][3]=pjs[t_d][3]-pjs[t_d][2]/t_step;
	pjs[t_d][5]=pjs[t_d][5]-pjs[t_d][4]/t_step;
	if (pjs[t_d][3]<0) pjs[t_d][3]=0;
	if (pjs[t_d][5]<0) pjs[t_d][5]=0;
	document.getElementById(pjs[t_d][0]).style.cssText="height:"+parseInt(pjs[t_d][3])+"px;width:"+parseInt(pjs[t_d][5])+"px;";
	if (pjs[t_d][3]==0 && pjs[t_d][5]==0) {
		clearInterval(pjs[t_d][1]);
		if (document.getElementById(pjs[t_d][0]).className.indexOf(" tshow_on")>=0) document.getElementById(pjs[t_d][0]).className= document.getElementById(pjs[t_d][0]).className.substring(0,document.getElementById(pjs[t_d][0]).className.indexOf(" tshow_on"));
	}
}

function scrollbar_main(t_d){
	t_i++;
	pjs[t_i]=new Array();
	pjs[t_i][0]=0;pjs[t_i][5]=0;
	t_d.style.cssText="padding:0;border:0;";
	pjs[t_i][1]=t_d.clientHeight;
	t_d.style.cssText="height:auto;padding:0;border:0;";
	pjs[t_i][2]=t_d.clientHeight-pjs[t_i][1];
	t_d.style.cssText="";//overflow:visible;
	if (pjs[t_i][2]>0) {
		var newcontainer=newtag("div#pjs"+t_i);
		newcontainer.style.cssText="height:"+pjs[t_i][1]+"px;overflow:hidden;";	
		newcontainer.innerHTML=t_d.innerHTML;
		t_d.innerHTML="";
		t_d.appendChild(newcontainer);
		var scrollbar_c=newtag("div.scrollbar");
		var scrollbar_t=newtag("div#pjs"+t_i+"_1.scrollbar_t");
		var scrollbar_m=newtag("div#pjs"+t_i+"_2.scrollbar_m");
		var scrollbar_b=newtag("div#pjs"+t_i+"_3.scrollbar_b");
		scrollbar_c.appendChild(scrollbar_t);
		scrollbar_c.appendChild(scrollbar_m);
		scrollbar_c.appendChild(scrollbar_b);
		scrollbar_c.style.cssText="height:"+pjs[t_i][1]+"px;";
		t_d.appendChild(scrollbar_c);
		if (scrollbar_m.clientHeight>0) {
			pjs[t_i][3]=pjs[t_i][1]-scrollbar_m.clientHeight;
		} else {
			scrollbar_m.style.cssText="height:"+parseInt(pjs[t_i][1]*pjs[t_i][1]/(pjs[t_i][1]+pjs[t_i][2]))+"px;overflow:hidden;";
			pjs[t_i][3]=pjs[t_i][1]-scrollbar_m.clientHeight;
		}
		scrollbar_t.style.cssText="height:0px;overflow:hidden;";
		scrollbar_b.style.cssText="height:"+pjs[t_i][3]+"px;overflow:hidden;";
		mf(scrollbar_t,"onclick","scrollbar_ck("+t_i+",-1)");
		mf(scrollbar_b,"onclick","scrollbar_ck("+t_i+",1)");
		mf(scrollbar_m,"onmousedown","scrollbar("+t_i+",1)");
		var scrollbar_mm=newtag("div#pjs"+t_i+"_4.scrollbar_mm");
		t_d.appendChild(scrollbar_mm);
		mf(scrollbar_mm,"onmousemove","scrollbar_move("+t_i+")");
		mf(scrollbar_mm,"onmouseup","scrollbar("+t_i+",0)");
		mf(scrollbar_mm,"onmouseout","scrollbar("+t_i+",0)");
		if (!pageisIE6){
			scrollbar_mm.style.cssText="position:fixed;width:100%;height:"+((document.documentElement.clientHeight>document.body.clientHeight)?document.documentElement.clientHeight:document.body.clientHeight)+"px;left:0;top:0;z-index:9999;cursor:default;display:none;";
		} else {
			scrollbar_mm.style.cssText="position:absolute;width:"+(3*document.documentElement.clientWidth)+"px;height:"+(3*document.documentElement.clientHeight)+"px;left:-"+document.documentElement.clientWidth+"px;top:-"+document.documentElement.clientHeight+"px;z-index:9999;cursor:default;display:none;";
		}
	}
}
function scrollbar_ck(t_d,t_t){
	pjs[t_d][0]=parseInt(pjs[t_d][0]+t_t*pjs[t_d][1]*0.75);
	if (pjs[t_d][0]<0) pjs[t_d][0]=0;
	if (pjs[t_d][0]>pjs[t_d][2]) pjs[t_d][0]=pjs[t_d][2];
	document.getElementById("pjs"+t_d).scrollTop=pjs[t_d][0];
	document.getElementById("pjs"+t_d+"_1").style.height=parseInt(pjs[t_d][3]*pjs[t_d][0]/pjs[t_d][2])+"px";
	document.getElementById("pjs"+t_d+"_3").style.height=(pjs[t_d][3]-parseInt(pjs[t_d][3]*pjs[t_d][0]/pjs[t_d][2]))+"px";
}

function scrollbar_move(t_d){
	if (pjs[t_d][6]==1) {
		var mouse_y=mousey();
		pjs[t_d][0]=pjs[t_d][4]+pjs[t_d][2]*(mouse_y-pjs[t_d][5])/pjs[t_d][3];
		if (pjs[t_d][0]<0) pjs[t_d][0]=0;
		if (pjs[t_d][0]>pjs[t_d][2]) pjs[t_d][0]=pjs[t_d][2];
		document.getElementById("pjs"+t_d).scrollTop=pjs[t_d][0];
		document.getElementById("pjs"+t_d+"_1").style.height=parseInt(pjs[t_d][3]*pjs[t_d][0]/pjs[t_d][2])+"px";
		document.getElementById("pjs"+t_d+"_3").style.height=(pjs[t_d][3]-parseInt(pjs[t_d][3]*pjs[t_d][0]/pjs[t_d][2]))+"px";
	}
}

function scrollbar(t_d,t_t){
	pjs[t_d][6]=t_t;
	if (pjs[t_d][6]==1) {
		pjs[t_d][5]=mousey();
		pjs[t_d][4]=pjs[t_d][0];
		document.getElementById("pjs"+t_d+"_4").style.display="block";
	} else {
		document.getElementById("pjs"+t_d+"_4").style.display="none";
		scrollbar_move(t_d);
	}
}

function hotimg_main(t_d,t_c,t_p,t_t,t_b,t_n){
	t_i++;
	pjs[t_i]=new Array();
	var anchorsub=t_d.getElementsByTagName("*");
	var btntxt="";
	pjs[t_i][0]=0;pjs[t_i][1]=t_p;pjs[t_i][2]=t_t;pjs[t_i][3]=(t_n!=undefined)?t_n.substring(1):"";pjs[t_i][4]=0;pjs[t_i][12]=0;pjs[t_i][14]=2;pjs[t_i][15]=1;
	pjs[t_i][5]=new Array();pjs[t_i][6]=new Array();pjs[t_i][7]=new Array();pjs[t_i][8]=new Array();
	for (j_j=0;j_j<anchorsub.length;j_j++) {
		if (tagif(anchorsub[j_j],t_c)){
			pjs[t_i][4]++;
			if (!anchorsub[j_j].id) anchorsub[j_j].id="pjs_"+t_i+"_"+pjs[t_i][4];
			pjs[t_i][8][pjs[t_i][4]]=anchorsub[j_j].id;
			pjs[t_i][9]=anchorsub[j_j].clientWidth;
			pjs[t_i][10]=anchorsub[j_j].clientHeight;
			anchorsub[j_j].style.position="absolute";
			if(pjs[t_i][4]==1)anchorsub[j_j].style.zIndex=2;
			if(anchorsub[j_j].getElementsByTagName("img")[0]){
				pjs[t_i][5][pjs[t_i][4]]=anchorsub[j_j].getElementsByTagName("img")[0].src;
				pjs[t_i][6][pjs[t_i][4]]=(anchorsub[j_j].getElementsByTagName("img")[0].alt)?anchorsub[j_j].getElementsByTagName("img")[0].alt:"";
			}
			if(anchorsub[j_j].getElementsByTagName("a")[0]){
				pjs[t_i][7][pjs[t_i][4]]=anchorsub[j_j].getElementsByTagName("a")[0].href;
				if (!anchorsub[j_j].getElementsByTagName("a")[0].id) anchorsub[j_j].getElementsByTagName("a")[0].id="pjs_a_"+t_i+"_"+pjs[t_i][4];
				if(pjs[t_i][5][pjs[t_i][4]].substring(pjs[t_i][5][pjs[t_i][4]].length-4)==".swf") {
					var nl = new SWFObject(pjs[t_i][5][pjs[t_i][4]],"","100%","100%","9,0,28,0");
					nl.addParam("wmode","opaque");
					nl.write(anchorsub[j_j].getElementsByTagName("a")[0].id);
				}
			} else {
				if(pjs[t_i][5][pjs[t_i][4]].substring(pjs[t_i][5][pjs[t_i][4]].length-4)==".swf") {
					var nl = new SWFObject(pjs[t_i][5][pjs[t_i][4]],"","100%","100%","9,0,28,0");
					nl.addParam("wmode","opaque");
					nl.write(anchorsub[j_j].id);
				}
			}
			btntxt+="<a href=\"javascript:hotimgs("+t_i+","+pjs[t_i][4]+")\" id=\"btn"+t_i+"_"+pjs[t_i][4]+"\""+((pjs[t_i][4]==1)?" class=\"current\"":"")+">"+((t_b=="img")?"<img src=\""+pjs[t_i][5][pjs[t_i][4]]+"\" />":pjs[t_i][4])+"</a>"
		}
	}
	if (pjs[t_i][3]!=""){
		if(pjs[t_i][5][1].substring(pjs[t_i][5][1].length-4)==".swf") {
			var nl = new SWFObject(pjs[t_i][5][1],"","100%","100%","9,0,28,0");
			nl.addParam("wmode","opaque");
			nl.write(pjs[t_i][3]);
		} else {
			document.getElementById(pjs[t_i][3]).style.backgroundImage="url("+pjs[t_i][5][1]+")";
			if (pjs[t_i][7][1]!=null) {
				document.getElementById(pjs[t_i][3]).innerHTML="<a href=\""+pjs[t_i][7][1]+"\" target=\"_blank\"></a>";
			} 
		}
	}
	t_d.appendChild(newtag("div#pjs_txt_"+t_i+".hotimgtxt"));
	document.getElementById("pjs_txt_"+t_i).innerHTML=pjs[t_i][6][1];
	t_d.appendChild(newtag("div#pjs_btn_"+t_i+".hotimgbtn"));
	document.getElementById("pjs_btn_"+t_i).innerHTML=btntxt
	mf(t_d,"onmouseover","hotimg_stop("+t_i+")");
	mf(t_d,"onmouseout","hotimg_move("+t_i+")");
	pjs[t_i][11]=setTimeout("hotimg_change("+t_i+")",pjs[t_i][2]);
}

function hotimg_change(t_j){
	pjs[t_j][12]++;
	if (pjs[t_j][12]==1) {
		pjs[t_j][13]=Math.round(Math.random()*7)+1;
		if (pjs[t_j][1]>0) pjs[t_j][13]=pjs[t_j][1];
	}
	if (pjs[t_j][12]<41) {
		switch (pjs[t_j][13]) {
			case 1 :
				j_k=Math.round(pjs[t_j][9]*(pjs[t_j][12]/40-1));
				j_l=Math.round(pjs[t_j][10]*(1-pjs[t_j][12]/40));
			break;
			case 2 :
				j_k=0;
				j_l=Math.round(pjs[t_j][10]*(1-pjs[t_j][12]/40));
			break;
			case 3 :
				j_k=Math.round(pjs[t_j][9]*(1-pjs[t_j][12]/40));
				j_l=Math.round(pjs[t_j][10]*(pjs[t_j][12]/40-1));
			break;
			case 4 :
				j_k=Math.round(pjs[t_j][9]*(pjs[t_j][12]/40-1));
				j_l=Math.round(pjs[t_j][10]*(pjs[t_j][12]/40-1));
			break;
			case 5 :
				j_k=0;
				j_l=Math.round(pjs[t_j][10]*(pjs[t_j][12]/40-1));
			break;
			case 6 :
				j_k=Math.round(pjs[t_j][9]*(1-pjs[t_j][12]/40));
				j_l=Math.round(pjs[t_j][10]*(1-pjs[t_j][12]/40));
			break;
			case 7 :
				j_k=Math.round(pjs[t_j][9]*(1-pjs[t_j][12]/40));
				j_l=0;
			break;
			default:j_k=0;j_l=0;
			if (pageisIE) {
				document.getElementById(pjs[t_j][8][pjs[t_j][15]]).style.filter="progid:DXImageTransform.Microsoft.Alpha(Opacity="+Math.abs(100-pjs[t_j][12]*5)+")";
			} else {
				document.getElementById(pjs[t_j][8][pjs[t_j][15]]).style.opacity=Math.abs(100-pjs[t_j][12]*5)/100;
			}
		}
		if (pjs[t_j][3]!="") {
			if (pageisIE) {
				document.getElementById(pjs[t_j][3]).style.filter="progid:DXImageTransform.Microsoft.Alpha(Opacity="+Math.abs(100-pjs[t_j][12]*5)+")";
			} else {
				document.getElementById(pjs[t_j][3]).style.opacity=Math.abs(100-pjs[t_j][12]*5)/100;
			}
		}
		document.getElementById(pjs[t_j][8][pjs[t_j][14]]).style.visibility="visible";
		document.getElementById(pjs[t_j][8][pjs[t_j][14]]).style.zIndex=3;
		document.getElementById(pjs[t_j][8][pjs[t_j][14]]).style.top=j_l+"px";
		document.getElementById(pjs[t_j][8][pjs[t_j][14]]).style.left=j_k+"px";
		if (pjs[t_j][12]==20) {
			pjs[t_j][15]=pjs[t_j][14];
			for (j_i=1;j_i<=pjs[t_j][4];j_i++) {
				document.getElementById("btn"+t_j+"_"+j_i).className="";
			}
			document.getElementById("btn"+t_j+"_"+pjs[t_j][15]).className="current";
			document.getElementById("pjs_txt_"+t_j).innerHTML=pjs[t_j][6][pjs[t_j][15]];
			if (pjs[t_j][3]!=""){
				if(pjs[t_j][5][pjs[t_j][15]].substring(pjs[t_j][5][pjs[t_j][15]].length-4)==".swf") {
					var nl = new SWFObject(pjs[t_j][5][pjs[t_j][15]],"","100%","100%","9,0,28,0");
					nl.addParam("wmode","opaque");
					nl.write(pjs[t_j][3]);
				} else {
					document.getElementById(pjs[t_j][3]).style.backgroundImage="url("+pjs[t_j][5][pjs[t_j][15]]+")";
					if (pjs[t_j][7][1]!=null) {
						document.getElementById(pjs[t_j][3]).innerHTML="<a href=\""+pjs[t_j][7][pjs[t_j][15]]+"\" target=\"_blank\"></a>";
					} 
				}
			}
		}
		pjs[t_j][11]=setTimeout("hotimg_change("+t_j+")",10);
	} else {
		if (pageisIE) {
			document.getElementById(pjs[t_j][8][pjs[t_j][15]]).style.filter="";
			if (pjs[t_j][3]!="")document.getElementById(pjs[t_j][3]).style.filter="";
		} else {
			document.getElementById(pjs[t_j][8][pjs[t_j][15]]).style.opacity=1;
			if (pjs[t_j][3]!="")document.getElementById(pjs[t_j][3]).style.opacity=1;
		}
		for (j_i=1;j_i<=pjs[t_j][4];j_i++) {
			document.getElementById(pjs[t_j][8][j_i]).style.zIndex=1;
			document.getElementById(pjs[t_j][8][j_i]).style.visibility="hidden";
			document.getElementById(pjs[t_j][8][j_i]).style.top=0;
			document.getElementById(pjs[t_j][8][j_i]).style.left=0;
		}
		document.getElementById(pjs[t_j][8][pjs[t_j][15]]).style.zIndex="2";
		document.getElementById(pjs[t_j][8][pjs[t_j][15]]).style.visibility="visible";
		pjs[t_j][12]=0;
		if (pjs[t_j][0]==0) {
			pjs[t_j][14]=pjs[t_j][15]+1;
			if (pjs[t_j][14]>pjs[t_j][4]) pjs[t_j][14]=1;
			pjs[t_j][11]=setTimeout("hotimg_change("+t_j+")",pjs[t_j][2]);
		}
		if (pjs[t_j][0]==3) {
			pjs[t_j][14]=pjs[t_j][15]+1;
			if (pjs[t_j][14]>pjs[t_j][4]) pjs[t_j][14]=1;
			pjs[t_j][0]=1;
			pjs[t_j][11]=setTimeout("hotimg_change("+t_j+")",pjs[t_j][2]);
		}
		if (pjs[t_j][0]==2) {
			pjs[t_j][0]=3;
			hotimg_change(t_j);
		}
	}
}
function hotimgs(t_j,mt){
	clearTimeout(pjs[t_j][11]);
	if (pjs[t_j][15]!=mt) {
		pjs[t_j][0]=2;
		pjs[t_j][12]=40;
		pjs[t_j][14]=mt;
		hotimg_change(t_j);
	} else {
		pjs[t_j][9]=setTimeout("hotimg_change("+t_j+")",pjs[t_j][2]);
	}
}
function hotimg_stop(t_j){
	if (pjs[t_j][0]==0) {
		pjs[t_j][0]=1;
		pjs[t_j][12]=40;
		clearTimeout(pjs[t_j][11]);
		hotimg_change(t_j);
	}
}
function hotimg_move(t_j){
	if (pjs[t_j][0]==1) {
		pjs[t_j][0]=0;
		clearTimeout(pjs[t_j][11]);
		pjs[t_j][11]=setTimeout("hotimg_change("+t_j+")",pjs[t_j][2]);
	}
}

function likeselect_main(t_d,t_c){
	t_i++;
	pjs[t_i]=new Array();
	if (!t_d.id) t_d.id="pjs_"+t_i;
	pjs[t_i]=t_d.id;
	var anchorsub=t_d.getElementsByTagName("*");
	for (j_j=0;j_j<anchorsub.length;j_j++) {
		if (tagif(anchorsub[j_j],t_c)){
			anchorsub[j_j].className+=" likeselectinput"
			mf(anchorsub[j_j],"onclick","likeselect_open("+t_i+")");
		}
	}
}
function likeselect_open(t_j){
	if (document.getElementById(pjs[t_j]).className.indexOf(" likeselectopen")>=0) {
		document.getElementById(pjs[t_j]).className=document.getElementById(pjs[t_j]).className.substring(0,document.getElementById(pjs[t_j]).className.indexOf(" likeselectopen"));
	} else {
		document.getElementById(pjs[t_j]).className+=" likeselectopen";
	}
}
function likeselect(t_d,t_id) {
	var anchorsub=document.getElementById(t_id).getElementsByTagName("*");
	for (j_j=0;j_j<anchorsub.length;j_j++) {
		if (tagif(anchorsub[j_j],'.likeselectinput')) {
			anchorsub[j_j].innerHTML=t_d.innerHTML;
		}
		if(tagif(anchorsub[j_j],'a')) {
			if (anchorsub[j_j].className.indexOf(" current")>=0) {
				anchorsub[j_j].className=anchorsub[j_j].className.substring(0,anchorsub[j_j].className.indexOf(" current"));
			}
		}
	}
	t_d.className+=" current";
	if (document.getElementById(t_id).className.indexOf(" likeselectopen")>=0) {
		document.getElementById(t_id).className=document.getElementById(t_id).className.substring(0,document.getElementById(t_id).className.indexOf(" likeselectopen"));
	}
}

function morecss(t_d,t_n,t_c,t_b) {
	var anchorsub=t_d.getElementsByTagName("*");
	var t_k=0;
	for (j_j=0;j_j<anchorsub.length;j_j++) {
		if (tagif(anchorsub[j_j],t_n)){
			t_k++;
			anchorsub[j_j].className+=" "+t_c+t_k;
			if (t_k>=t_b) t_k=0;
		}
	}
}
