﻿//调用<img onload="ResizeImage(this, 110, 110);"/>
function ResizeImage(F,D,G){if(F!=null){imageObject=F}var E=imageObject.readyState;if(E!="complete"){setTimeout("ResizeImage(null,"+D+","+G+")",50);return }var B=new Image();B.src=imageObject.src;var A=B.width;var C=B.height;if(A>D||C>G){a=A/D;b=C/G;if(b>a){a=b}A=A/a;C=C/a}if(A>0&&C>0){imageObject.width=A;imageObject.height=C}}
//调用<script type="text/javascript">InsertFlash("images/top.swf",110,110);</script>
function InsertFlash(Flash,Width,Height){
	document.writeln("<embed src=\"" + Flash + "\"  type=\"application\/x-shockwave-flash\" width=\""+Width+"\" height=\""+Height+"\"  wmode=\"transparent\" ><\/embed>");
}
//功能介绍：展开树状分支
function showList(show){if (show.style.display == 'none') {show.style.display = 'block';}else {show.style.display = 'none';}}
//反选
function checkAll(thisform){var ids = thisform.elements['id'];var type = typeof(ids.name); if ( type != 'undefined' ){ids.checked = !ids.checked;}else{for(i=0; i<ids.length; i++){ids[i].checked = !ids[i].checked;}}}
/*****************************
TreeMenu
*****************************/
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;
}
function CNLTreeMenu(id,TagName0) {
  this.id=id;
  this.TagName0=TagName0==""?"li":TagName0;
  this.AllNodes = Ob(this.id).getElementsByTagName(TagName0);
  this.InitCss = function (ClassName0,ClassName1,ClassName2,ImgUrl) {
  this.ClassName0=ClassName0;
  this.ClassName1=ClassName1;
  this.ClassName2=ClassName2;
  this.ImgUrl=ImgUrl || "images/s.gif";
  this.ImgBlankA ="<img src=\""+this.ImgUrl+"\" class=\"s\" onclick=\"ExCls(this,'"+ClassName0+"','"+ClassName1+"',1);\" alt=\"展开/折叠\" />";
  this.ImgBlankB ="<img src=\""+this.ImgUrl+"\" class=\"s\" />";
  for (i=0;i<this.AllNodes.length;i++ ) {
   this.AllNodes[i].className==""?this.AllNodes[i].className=ClassName1:"";
   this.AllNodes[i].innerHTML=(this.AllNodes[i].className==ClassName2?this.ImgBlankB:this.ImgBlankA)+this.AllNodes[i].innerHTML;
   }
 }
 this.SetNodes = function (n) {
  var sClsName=n==0?this.ClassName0:this.ClassName1;
  for (i=0;i<this.AllNodes.length;i++ ) {
   this.AllNodes[i].className==this.ClassName2?"":this.AllNodes[i].className=sClsName;
  }
 }
}


function AddToSort1(imagePath){
  window.opener.form1.banner_1.focus();								
  window.opener.document.form1.banner_1.value=imagePath;
  window.opener=null;
  window.close();
}
function AddToSort2(imagePath){
  window.opener.form1.banner_2.focus();								
  window.opener.document.form1.banner_2.value=imagePath;
  window.opener=null;
  window.close();
}
function AddToSort3(imagePath){
  window.opener.form1.banner_3.focus();								
  window.opener.document.form1.banner_3.value=imagePath;
  window.opener=null;
  window.close();
}
function AddToSort4(imagePath){
  window.opener.form1.banner_4.focus();								
  window.opener.document.form1.banner_4.value=imagePath;
  window.opener=null;
  window.close();
}
function AddToSort5(imagePath){
  window.opener.form1.pdf.focus();								
  window.opener.document.form1.pdf.value=imagePath;
  window.opener=null;
  window.close();
}


function OpenScript(url,width,height)
{
  var win = window.open(url,"SelectToSort",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,status=yes' );
}

function correctPNG() // correctly handle PNG transparency in Win IE 5.5 & 6. 
{ 
    var arVersion = navigator.appVersion.split("MSIE") 
    var version = parseFloat(arVersion[1]) 
    if ((version >= 5.5) && (document.body.filters)) 
    { 
       for(var j=0; j<document.images.length; j++) 
       { 
          var img = document.images[j] 
          var imgName = img.src.toUpperCase() 
          if (imgName.substring(imgName.length-3, imgName.length) == "PNG") 
          { 
             var imgID = (img.id) ? "id='" + img.id + "' " : "" 
             var imgClass = (img.className) ? "class='" + img.className + "' " : "" 
             var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' " 
             var imgStyle = "display:inline-block;" + img.style.cssText 
             if (img.align == "left") imgStyle = "float:left;" + imgStyle 
             if (img.align == "right") imgStyle = "float:right;" + imgStyle 
             if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle 
             var strNewHTML = "<span " + imgID + imgClass + imgTitle 
             + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";" 
             + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader" 
             + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
             img.outerHTML = strNewHTML 
             j = j-1 
          } 
       } 
    }     
} 



// floater
function floater() // floater
{
document.writeln("<div id=\"kfFloat\" style=\"margin:0; padding:0; z-index: 20; visibility: visible; position: absolute; top: 150px; right:9px;\">");
document.writeln("<table id=\"qqtab\" cellspacing=\"0\" cellpadding=\"0\" width=\"110\" border=\"0\">");
document.writeln("    <tbody>");
document.writeln("        <tr>");
document.writeln("            <td valign=\"bottom\" width=\"110\" onclick=\"if(document.getElementById('qqtab').style.display==\'none\'){document.getElementById('qqtab').style.display=\'\'} else {document.getElementById('qqtab').style.display=\'none\'}\"><img alt=\"点击关闭\" border=\"0\" src=\"\/images\/qq\/skin\/0\/top.gif\" \/><\/td>");
document.writeln("        <\/tr>");
document.writeln("        <tr id=\"qqstab\">");
document.writeln("            <td valign=\"middle\" align=\"center\"style=\"background:url(\/images\/qq\/skin\/0\/mid.gif) repeat-y\">");
document.writeln("            <table cellspacing=\"0\" cellpadding=\"0\" width=\"89\" border=\"0\">");
document.writeln("                <tbody>");
document.writeln("                    <tr>");
document.writeln("                        <td valign=\"middle\" align=\"center\" width=\"89\" height=\"26\"><nobr><a title=\"婚纱批发请咨询我！\" target=\"_blank\" href=\"http:\/\/webchat.tq.cn\/sendmain.jsp?uin=8591491\"><font style=\"font-size: 12px; color: #00f\">批发客服<\/font>&nbsp;<img alt=\"\" border=\"0\" src=\"http:\/\/float2006.tq.cn\/staticimg.jsp?uin=8591491&amp;style=1\" \/><\/a><\/nobr><\/td>");
document.writeln("                    <\/tr>");

document.writeln("                    <tr>");
document.writeln("                        <td valign=\"middle\" align=\"center\" width=\"89\" height=\"26\"><nobr><a title=\"婚纱定做请咨询我！\" target=\"_blank\" href=\"http:\/\/webchat.tq.cn\/sendmain.jsp?uin=8591489\"><font style=\"font-size: 12px; color: #00f\">定做客服<\/font>&nbsp;<img alt=\"\" border=\"0\" src=\"http:\/\/float2006.tq.cn\/staticimg.jsp?uin=8591489&amp;style=1\" \/><\/a><\/nobr><\/td>");
document.writeln("                    <\/tr>");document.writeln("                    <tr>");
document.writeln("                        <td valign=\"middle\" align=\"left\" width=\"89\" height=\"26\"><nobr><a target=\"_blank\" href=\"http:\/\/wpa.qq.com\/msgrd?V=1&amp;Uin=18390321&amp;Site=系统测试&amp;Menu=yes\"><font style=\"font-size: 9pt; color: #f00\">批发<\/font> <img alt=\"婚纱批发客服\" border=\"0\" src=\"http:\/\/wpa.qq.com\/pa?p=1:104820973:16\" \/> <\/a><\/nobr><\/td>");
document.writeln("                    <\/tr>");document.writeln("                    <tr>");
document.writeln("                        <td valign=\"middle\" align=\"left\" width=\"89\" height=\"26\"><nobr><a href=\"tencent:\/\/message\/?Uin=104820973&amp;Site=苏州婚纱网&amp;Menu=yes\"><font style=\"font-size: 9pt; color: #e3028e\">定做<\/font> <img alt=\"婚纱定做客服\" border=\"0\" src=\"http:\/\/wpa.qq.com\/pa?p=1:104820973:10\" \/> <\/a><\/nobr><\/td>");
document.writeln("                    <\/tr>");document.writeln("                    <tr>");
document.writeln("                        <td valign=\"middle\" align=\"left\" width=\"89\" height=\"26\"><nobr><a target=\"_blank\" href=\"http:\/\/amos1.taobao.com\/msg.ww?v=2&amp;uid=ftoin=1\"><font style=\"font-size: 12px; color: #00f\">旺旺<\/font> <img alt=\"淘宝旺旺\" border=\"0\" src=\"http:\/\/amos1.taobao.com\/online.ww?v=2&amp;uid=ftoin&amp;site=cntaobao&amp;s=1\" \/> <\/a><\/nobr><\/td>");
document.writeln("                    <\/tr>");
document.writeln("                <\/tbody>");
document.writeln("            <\/table>");
document.writeln("            <table cellspacing=\"0\" cellpadding=\"0\" width=\"89\" border=\"0\">");
document.writeln("                <tbody>");
document.writeln("                    <tr>");
document.writeln("                        <td valign=\"bottom\" align=\"left\" width=\"25\" height=\"17\"><a target=\"_blank\" href=\"msnim:chat?contact=youshow@hunsha.cc\"><img alt=\"MSN\" border=\"0\" src=\"\/images\/qqface\/101_m.gif\" \/><\/a><\/td>");
document.writeln("                        <td valign=\"bottom\" width=\"63\" height=\"17\" style=\"border:#ffc795 1px solid; background-color: #ffef6a\"><nobr><a target=\"_blank\" href=\"msnim:chat?contact=youshow@hunsha.cc\"><font style=\"font-size: 9pt; color: #008040; letter-spacing: 1.5pt\">MSN<\/font>:<font style=\"font-size: 9pt; color: #458f34\">You Show<\/font> <\/a><\/nobr><\/td>");
document.writeln("                    <\/tr>");document.writeln("                    <tr>");
document.writeln("                        <td valign=\"middle\" align=\"center\" width=\"25\" height=\"26\"><img alt=\"\" border=\"0\" src=\"\/images\/qqface\/111_m.gif\" \/><\/td>");
document.writeln("                        <td valign=\"middle\" align=\"center\" width=\"63\" height=\"26\"><a target=\"_blank\" href=\"\/contact\"><font style=\"font-size: 12px; color: #ff6600\">联系方式<\/font><\/a><\/td>");
document.writeln("                    <\/tr>");
document.writeln("                <\/tbody>");
document.writeln("            <\/table>");
document.writeln("            <\/td>");
document.writeln("        <\/tr>");
document.writeln("        <tr>");
document.writeln("            <td valign=\"top\" width=\"110\" onClick=\"if(document.getElementById('qqstab').style.display==\'none\'){document.getElementById('qqstab').style.display=\'block\'} else {document.getElementById('qqstab').style.display=\'none\'}\"><img alt=\"点击收起\" border=\"0\" src=\"\/images\/qq\/skin\/0\/bot.gif\" \/><\/td>");
document.writeln("        <\/tr>");
document.writeln("    <\/tbody>");
document.writeln("<\/table>");
document.writeln("<\/div>");

//js 部分
document.writeln("<script type=\"text\/javascript\">");
document.writeln("\/\/<![CDATA[");
document.writeln("var tips; var theTop = 120; var old = theTop;");
document.writeln("function initFloatTips() {");
document.writeln("tips = document.getElementById(\'kfFloat\');");
document.writeln("moveTips();");
document.writeln("};");
document.writeln("function moveTips() {");
document.writeln("var grantt=20;");
document.writeln("if (window.innerHeight) {");
document.writeln(" pos = window.pageYOffset");
document.writeln("}");
document.writeln("else if (document.documentElement && document.documentElement.scrollTop) {");
document.writeln(" pos = document.documentElement.scrollTop");
document.writeln("}");
document.writeln("else if (document.body) {");
document.writeln(" pos = document.body.scrollTop;");
document.writeln("}");
document.writeln("pos=pos-tips.offsetTop+theTop;");
document.writeln("pos=tips.offsetTop+pos\/10;");document.writeln("if (pos < theTop) pos = theTop;");
document.writeln("if (pos != old) {");
document.writeln(" tips.style.top = pos+\"px\";");
document.writeln(" grantt=10;");
document.writeln("   \/\/alert(tips.style.top);");
document.writeln("}");document.writeln("old = pos;");
document.writeln("setTimeout(moveTips,grantt);");
document.writeln("}");
document.writeln("\/\/!]]>");
document.writeln("initFloatTips();");
document.writeln("<\/script>");
}
