/*** gantry-pillanim.js ***/
/**
 * @package		Gantry Template Framework - RocketTheme
 * @version		1.5.3 April 21, 2010
 * @author		RocketTheme http://www.rockettheme.com
 * @copyright 	Copyright (C) 2007 - 2010 RocketTheme, LLC
 * @license		http://www.rockettheme.com/legal/license.php RocketTheme Proprietary Use License
 */
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('F S=k 1f({4:{s:1c,w:K.19.18.17,e:\'#15\',q:{\'f\':\'U-q-l\',\'h\':\'U-q-r\'}},V:L(a,b){2.o=$$(a)[0]||10;8(!2.o)W;2.X(b);F c=k Q(\'P\',{\'O\':2.4.q.f}).M(2.o,\'Y\');k Q(\'P\',{\'O\':2.4.q.h}).M(c);2.m=2.o.Z(\'11\');2.7=2.o.B(\'.7\');2.t=G;8(!2.7){2.t=12;2.7=2.m[0]}8(2.m[0].E(\'7\')){2.D=2.m[1].B(\'.I\').6(\'e\')}R{2.D=2.m[0].B(\'.I\').6(\'e\')}2.u=c.6(\'g\').9();2.v=c.6(\'N-f\').9()+c.6(\'N-h\').9();2.H=c.6(\'j-f-3\').9()+c.6(\'j-h-3\').9();2.p=c.6(\'j-g-3\').9()+c.6(\'j-13-3\').9();2.i={\'f\':2.7.C-c.6(\'j-h-3\').9(),\'g\':2.7.x+2.u-2.p,\'3\':2.7.y-2.v-2.H};2.5=k K.14(c,{s:2.4.s,w:2.4.w,T:G}).A(2.i);8(2.t){2.5.A({\'z\':0});2.i.z=0}F d=2;2.m.16({\'1a\':L(){8(!2.5&&d.4.e&&!2.E(\'7\')){2.5=k K.1b(2.B(\'.I\'),\'e\',{s:d.4.s,w:d.4.w,T:G}).A(d.D)}8(d.t){8(d.5.1d.z==0){d.5.A({\'f\':2.C-c.6(\'j-h-3\').9(),\'g\':d.i.g=2.x+d.u-d.p,\'3\':2.y-d.v-d.H})};d.5.n({\'f\':2.C-c.6(\'j-h-3\').9(),\'g\':2.x+d.u-d.p,\'3\':2.y-d.v,\'z\':1});8(d.4.e&&!2.E(\'7\'))2.5.n(d.4.e)}R{d.5.n({\'f\':2.C-c.6(\'j-h-3\').9(),\'g\':2.x+d.u-d.p,\'3\':2.y-d.v});8(d.4.e&&!2.E(\'7\'))2.5.n(d.4.e)}},\'1e\':L(){8(d.t){J d.i.f;J d.i.g;J d.i.3}d.5.n(d.i);8(2.5&&d.4.e)2.5.n(d.D)}})}});S.1g(k 1h,k 1i);',62,81,'||this|width|options|fx|getStyle|active|if|toInt|||||color|left|top|right|pillDefaults|border|new||list|start|el|pillBordersTopBottom|pill||duration|noActive|pillTop|pillMargins|transition|offsetTop|offsetWidth|opacity|set|getElement|offsetLeft|defaultColor|hasClass|var|false|pillBordersLeftRight|item|delete|Fx|function|inject|margin|class|div|Element|else|GantryPill|wait|fusion|initialize|return|setOptions|after|getElements|null|li|true|bottom|Styles|fff|addEvents|easeOut|Quad|Transitions|mouseenter|Style|400|now|mouseleave|Class|implement|Events|Options'.split('|'),0,{}))

/*** gantry-buildspans.js ***/
/**
 * @version   2.5.5 April 12, 2010
 * @author    RocketTheme http://www.rockettheme.com
 * @copyright Copyright (C) 2007 - 2010 RocketTheme, LLC
 * @license   http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
 */
var GantryBuildSpans=function(g,j,k){(g.length).times(function(i){var e="."+g[i];var f=function(a){a.setStyle('visibility','visible');var b=a.getText();var c=b.split(" ");first=c[0];rest=c.slice(1).join(" ");html=a.innerHTML;if(rest.length>0){var d=a.clone().setText(' '+rest),span=new Element('span').setText(first);span.inject(d,'top');a.replaceWith(d)}};$$(e).each(function(c){j.each(function(h){c.getElements(h).each(function(b){var a=b.getFirst();if(a&&a.getTag()=='a')f(a);else f(b)})})})})};

//var rokboxPath = '#';

//带飘带的文字变成前白后黑
window.addEvent('domready', function() {var modules = ['rt-block'];var header = ['h3','h2','h1'];GantryBuildSpans(modules, header);});
		

//主菜单动画
window.addEvent('domready', function() {new GantryPill('ul.menutop', {duration: 250, transition: Fx.Transitions.linear, color: false})});

/*菜单打开关闭用*/
function Ob(o){
 var o=document.getElementById(o)?document.getElementById(o):o;
 return o;
}
function Hd(o) {
 Ob(o).style.display="none";
}
function Sw(o) {
 Ob(o).style.display="";
}
function ExCls(o,a,b,n){
 var o=Ob(o);
 for(i=0;i<n;i++) {o=o.parentNode;}
 o.className=o.className==a?b:a;
}

/*模拟点击link的方法*/
function openLinkById(ID){
	if(document.all){
		document.getElementById(ID).click();
	}else{
		var evt = document.createEvent("MouseEvents");
		evt.initEvent("click", true, true);
		document.getElementById(ID).dispatchEvent(evt);
	} 
}
/*登录成功刷新登录区的方法*/
function logined(){
	document.getElementById('iframe_1').style.display = "none";
	document.getElementById('loading_img').style.display = "block";
	window.frames['iframe_1'].document.location.reload();
	//closeIframe('', '');
}
function closeIframe(){
	myLytebox.end();
	return false;
}
function closeIframe(succeed, ID){
	myLytebox.end();
}

/*lyteiframe:lbIframe 高度修正*/
function changeLyteboxHeight(H){
	document.getElementById('lbIframe').height = H;
}

/* 点击切换页面链接的目标窗口 zzh 2011-02-23*/
function changeLinksTargetTo(target){
	/* 设置cookie */
	var date = new Date();
	var expireDays = 365;//将date设置为365天以后的时间
	date.setTime(date.getTime()+expireDays*24*3600*1000);
	document.cookie="page_link_target=" + target +"; expires="+date.toGMTString();
	//改变页面link目标窗口
	pageLinksTargetTo(target,"true");
	//return false;
}

/*修改页面链接的默认目标窗口 zzh 2011-02-23*/
function pageLinksTargetTo(target,changeClass){
	var alllinks = document.getElementsByTagName("a");
	var testUrl = top.location.href;
	testUrl = testUrl.replace(/(#){1}(.*$)/g, "");//截去"#"及以后的内容
	testUrl += "#";
	var hostdomain = window.location.host;
	var localUrllength = testUrl.length;
	for(var i=0; i < alllinks.length; i++){
		var link = alllinks[i].href;
		if(link.substr(0,7) == "http://" && link.indexOf("http://"+hostdomain) < 0){//外站地址
			continue;
		}else{
			if(link.substr(0,1) != "#" && link.substr(0,10) != "javascript" && link.substr(0,localUrllength) != testUrl){
				alllinks[i].target = target;
			}
		}
	}
	if(changeClass=="true"){
		if(target == "_self"){
			document.getElementById("self_mod_link").className = "active";
			document.getElementById("new_mod_link").className = "";
		}else{
			document.getElementById("self_mod_link").className = "";
			document.getElementById("new_mod_link").className = "active";
		}
	}
}

//广告点击
var xmlHttpRequest;
function koukokuClick(ADS_COD){
	
	if (window.XMLHttpRequest) //For general cases
	{
		xmlHttpRequest = new XMLHttpRequest();
	}else //For IE
	{
		if(window.ActiveXObject){
			xmlHttpRequest = new ActiveXObject("Microsoft.XMLHTTP");
		}
	}

	var url = "index.php?action_bs00000koukokuclick=true"+"&ADS_COD="+ADS_COD;
//				+"&STA_FRM="+encodeURIComponent(STA_FRM);

	xmlHttpRequest.open("get",url,true);
//	xmlHttpRequest.onreadystatechange = showMessage; 
	xmlHttpRequest.send(null);
}
