
function moveSub(sub) { 
    switch(sub) {
		case "A00" :	url="/Page.Show.asp?id=10";break;
		case "B00" :	url="/cgal.asp";break;
		case "C00" :	url="/Page.Show.asp?id=14";break;
		case "D00" :	url="/Page.Show.asp?id=16";break;
	}
    if(url !="") { 
        this.location.href=url;
	}
}
//javascript:moveSub(\'F00\')//javascript:void(0);


function SetCookieLang(lang){
	if (lang==null){return;};
    document.cookie="lang="+lang;
	window.location.reload();
}


//自动调整图片大小
function DrawImage(ImgD, FitWidth, FitHeight) {
    if (FitWidth==null||FitWidth=='undefined') FitWidth = 121; //设置图片宽度界限
    if (FitHeight==null||FitHeight=='undefined') FitHeight = 82; //设置图片高度界限
    ImgD.style.display = "";
    var image = new Image();
    image.src = ImgD.src;
    if (image.width > 0 && image.height > 0) {
        if (image.width / image.height >= FitWidth / FitHeight) {
            if (image.width > FitWidth) {
                ImgD.width = FitWidth;
                ImgD.height = (image.height * FitWidth) / image.width;
            } else {
                ImgD.width = image.width;
                ImgD.height = image.height;
            }
            //ImgD.alt = "原图片大小(" + image.width + "×" + image.height + ")";
        }
        else {
            if (image.height > FitHeight) {
                ImgD.height = FitHeight;
                ImgD.width = (image.width * FitHeight) / image.height;
            } else {
                ImgD.width = image.width;
                ImgD.height = image.height;
            }
            //ImgD.alt = "原图片大小(" + image.width + "×" + image.height + ")";
        }
    }
}



function get_data(o){
	if (load_YN!="1") return;
	pic_show();
	var topic='',pic_1='',url_1='',classid='',str_9='';
    var str=o.innerHTML;
    try{topic=str.match(/(?=\<\!--\[data\_0\] begin--\>)([\d|\D]*)(?=\<\!--\[data\_0\] end--\>)/ig);
        topic=topic.toString().substr(21);}catch(e){};
    try{pic_1=str.match(/(?=\<\!--\[data\_1\] begin--\>)([\d|\D]*)(?=\<\!--\[data\_1\] end--\>)/ig);
        pic_1=pic_1.toString().substr(21);}catch(e){};
    try{url_1=str.match(/(?=\<\!--\[data\_2\] begin--\>)([\d|\D]*)(?=\<\!--\[data\_2\] end--\>)/ig);
        url_1=url_1.toString().substr(21);}catch(e){};
    try{classid=str.match(/(?=\<\!--\[data\_3\] begin--\>)([\d|\D]*)(?=\<\!--\[data\_3\] end--\>)/ig);
        classid=classid.toString().substr(21);}catch(e){};
    try{str_9=str.match(/(?=\<\!--\[data\_4\] begin--\>)([\d|\D]*)(?=\<\!--\[data\_4\] end--\>)/ig);
        str_9=str_9.toString().substr(21);}catch(e){};

    if (classid==null)classid="";
    if (str_9==null)str_9="";
    var num=o.id.replace(/[^\d]+/g,"");if (num!="") num=parseInt(num);
    pic_show(topic,pic_1,url_1,classid,str_9,num);
}
function pic_show(topic,pic_1,url_1,classid,str_9,num){
	if (load_YN!="1") return;
    var e=document.getElementById("div_pic_show");
/*    if(!e){var obj=document.createElement("div");
    obj.id='div_pic_show';obj.style.position='absolute';obj.style.background='#efefef';obj.style.zIndex='1000';obj.style.border='1px #000000 solid';obj.style.padding='2 4 2 4';
    document.body.appendChild(obj);
    obj.onclick=function(){pic_show()};obj.alt="点击返回";
    }
    e=document.getElementById("div_pic_show");
*/
  	if(pic_1==null || pic_1=="") {
		e.innerHTML="";e.style.display="none";return;
	}else {
		var s="<div class=clear><div style='float:left;width:367px;'>";
		s+="<object classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0 width=367 height=400><PARAM NAME=movie VALUE=tpl/default/images/cgal.swf><PARAM NAME=quality VALUE=high><param name=Wmode value=transparent><PARAM Name=FlashVars Value='img="+pic_1+"'></OBJECT>";
		s+="</div>";
		s+="<div style='float:left;width:243px;'>"
		s+="<ul>"
		s+="<li>网站名称：</li><li class=right>"+topic+"</li>";
		s+="<li>网　　址：</li><li class=right><a href='"+url_1+"' target=_blank class=table_main>"+url_1+"</a>&nbsp;</li>";
		s+="<li>所属分类：</li><li class=right>"+classid+"</li>";
		s+="<li>简要介绍：</li><li class=right>"+str_9+"</li>";
		s+="</ul>";
		s+="</div>";
		s+="</div><div style='text-align:right'>";
		if(document.getElementById("div_bt"+(num-1))) s+=" <input type=button value=上一个 class=bt_1 onclick='get_data(document.getElementById(\"div_bt"+(num-1)+"\"))'>"
		if(document.getElementById("div_bt"+(num+1))) s+=" <input type=button value=下一个 class=bt_1 onclick='get_data(document.getElementById(\"div_bt"+(num+1)+"\"))'>"
		s+=" <input type=button value='返 回' class=bt_1 onclick='pic_show()'>";
		s+="</div>";
		e.innerHTML=s;e.style.display="block";
  	}
}

function high(which){	
    theobject=which;
    highlighting=setInterval("highlightit(theobject)",50);
}
function low(which){
    clearInterval(highlighting);
    which.filters.alpha.opacity=70;
}
function highlightit(that){
    if (that.filters.alpha.opacity<100)
    that.filters.alpha.opacity+=10
    else if (window.highlighting)
    clearInterval(highlighting)
}
