// JavaScript Document

  function AddFavorite(){   //添加到收藏夹
    title = "朝天翼视觉创意工作室"; 
    url = "http://www.goupwing.com";
    if (window.sidebar) { 
      window.sidebar.addPanel(title,url,""); 
     }else if (document.all) {
      window.external.AddFavorite(url,title);
     } else if (window.opera && window.print) {
      return true;
     }
  }

  function SwPngPics(pngid){ //判断浏览器类型，区别插入PNG图片
    if (navigator.appName!="Microsoft Internet Explorer") {
	   if (pngid==1) {
         document.write("<div id=\"wing3dlogo\"><img src=\"skin/images/wing3dlogo.png\" alt=\"wings 3dlogo\"/></div>");
        }else{
		 document.write("<input name=\"submit\" type=\"image\" src=\"skin/images/submit.png\" />");
	   }
	 }else{
	   if (pngid==1) {
         document.write("<div id=\"wing3dlogo\" style=\"filter :progid:DXImageTransform.Microsoft.AlphaImageLoader(src='skin/images/wing3dlogo.png',sizingMethod='image');\" alt=\"wings 3dlogo\"></div>");
	    }else{
         document.write("<input name=\"submit\" type=\"image\" src=\"skin/images/spacer.gif\" style=\"filter :progid:DXImageTransform.Microsoft.AlphaImageLoader(src='skin/images/submit.png',sizingMethod='image');\" />");
      }
    }
  }

  function C_Flashs(url,width,height,transparent) {
  // Clear active line of the flashs for IE
     var param_t='';
     if (transparent!=0) {
        param_t='wmode="transparent"';
     }
     document.write('<embed src="'+url+'" width="'+width+'" height="'+height+'" quality="high" menu="false" '+param_t+' pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash"></embed>');
  }
  
  function C_SwfurlPics(url,href,width,height,target) {
  // Clear active line of the flashs for IE
    if (href != "") {
	  href = '&imageLink='+href+'&windowOpen='+target+'';
    }
      document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="'+width+'" height="'+height+'"> <param name="movie" value="skin/images/swfoto.swf?image='+url+href+'"> <param name="quality" value="high" /> <param name="menu" value="false" /> <embed src="skin/images/swfoto.swf?image='+url+href+'" width="'+width+'" height="'+height+'" quality="high" menu="false" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash"></embed></object>');
  }
  
  function ReImgSize(){ //自动检测图片大小，超宽缩放
    for (i=0;i<document.images.length;i++)
      {
      if (document.all){
	  if (document.images[i].width>530)
	  {
         document.images[i].width="530"
         document.images[i].outerHTML='<a href="../common/'+document.images[i].src+'" target="_blank" title="在新窗口打开图片">'+document.images[i].outerHTML+'</a>'
  	  }
      }
      else{
	  if (document.images[i].width>500) {
	     document.images[i].title="在新窗口打开图片"
		 document.images[i].border="0"
	     document.images[i].style.cursor="pointer"
	     document.images[i].onclick=function(e){window.open(this.src)}
	  }
      }
      }
    }
  
  function SetFont(divname,size){   //改变文章内容字体大小
	document.getElementById(divname).className=divname+size
  }
