﻿var $ = function(element) {
	return (typeof(element) == 'object' ? element : document.getElementById(element));
};

var Browser=new Object();
Browser.isMozilla=(typeof document.implementation !='undefined')&&(typeof document.implementation.createDocument !='undefined')&&(typeof HTMLDocument!='undefined');
Browser.isIE=window.ActiveXObject ? true : false;
Browser.isFirefox=(navigator.userAgent.toLowerCase().indexOf("firefox")!=-1);
Browser.isOpera=(navigator.userAgent.toLowerCase().indexOf("opera")!=-1);




function showMy(){
var arkMyText='<div style="width:320px;height:18px;position:relative;"><div id="arkMyBox" style="position:absolute;top:0;left:0;z-index:99;width:320px;padding:0;height:16px;overflow:hidden;"><div style="padding:0 0 0 16px;"><iframe src="http://e-file.uuun.cn/tools/arkmy.htm?domaininfo=uuun.cn" scrolling="no" allowTransparency = "true" frameborder="0" width="272" height="56"></iframe><span id="arkMyTip" style="vertical-align:top;cursor:pointer;" onmouseup="setMyBox();">▼ </span></div><div style="height:12px;line-height:10px;font:8px Verdana,Arial;text-align:center;border-top:1px solid #333333" onmouseover="setMyBox();">▲ </div></div></div>';
$("arkMy").innerHTML=arkMyText;
if(Browser.isOpera){
var link = $('arkMyBox').parentNode;
link.style.position="";
$('arkMyBox').style.top=link.offsetTop+"px";
$('arkMyBox').style.left=link.offsetLeft+"px";
document.onresize="showMy()";
}
}
var setMyBox=function(){
if($("arkMyTip").innerHTML=="▼ "){
$("arkMyTip").innerHTML="▲ ";
$('arkMyBox').style.height='70px';
$('arkMyBox').style.background='#ecf3e1';
$('arkMyBox').style.border='1px solid #333333';}
else{
$("arkMyTip").innerHTML="▼ ";
$('arkMyBox').style.height='16px';
$('arkMyBox').style.background='';
$('arkMyBox').style.border='none';
}
}



function arkGoKey(key){
open('http://search.arkoo.com/?keyword='+encodeURI(key),'parent','');
}



function reText(){
	if(!Browser.isIE){
		return;
	}
	var dPu="";
	try{
		dPu=$("navChannel").getElementsByTagName('a')[0].pathname.replace(/(.*\/){0,}([^\.]+.*)/ig,"$2");
		}catch(e){}
		if(dPu=="shequhuodong.html"){
			$("authorInfo").innerHTML=$("authorInfo").innerHTML.replace(/发布/ig,'Publisher').replace(/媒体/ig,'Source').replace(/作者/ig,'Author');
		}
}





var setKooLink=function(){
var kso=$("kooSites").getElementsByTagName("dt");
for(var i=0;i<kso.length;i+=2){
kso[i].getElementsByTagName("a")[0].href=kso[i+1].getElementsByTagName("a")[0].href="javascript:void(arkGoKey('"+kso[i].getElementsByTagName("a")[0].innerHTML+"'))";
}
}

var setKooLink2=function(){
var kso=$("kooSites2").getElementsByTagName("a");
for(var i=0;i<kso.length;i++){
kso[i].href="javascript:void(arkGoKey('"+kso[i].innerHTML+"'))";
}
}








