﻿// JScript 文件

        function check()
        {
           if(document.getElementById("Header1$txtContent").value=="")
           {
              alert("请输入要查询的关键字");
              return false;
           }
           return true;
        }
        
        function checkSer()
        {
           if(document.getElementById("Header_i1$txtSer").value=="")
           {
              alert("请输入要查询的关键字");
              return false;
           }
           return true;
        }
        
        function checkLogin()
        {
           if(document.getElementById("Login1$txtName").value=="")
           {
              alert("用户名不能为空");
              return false;
           }
           if(document.getElementById("Login1$txtPwd").value=="" )
           {
              alert("密码不能为空");
              return false;
           }
           return true;
        }
        
        function save()
        {
            window.external.AddFavorite('http://www.scxianxian.com/','欢迎收藏--鲜鲜超市');
        }
        
        function enlargePic(img)
        { 
            img.width = "95"; 
            img.height = "95";
        } 
        function reducePic(img)
        { 
            img.width = "90"; 
            img.height = "90"; 
        }
        
        function comment()
        {
        document.getElementById("comment_a").style.display="block";
 document.getElementById("one").style.display="none";
  document.getElementById("two").style.display="block";
        }
        
        
        function commentHiddle()
        {
        document.getElementById("comment_a").style.display="none";
 document.getElementById("one").style.display="block";
 document.getElementById("two").style.display="none";
        }
        
        
        //幻灯片

        function play_images(pics, links, texts,picwidth,picheight,textheight)
        {
            var focus_width = picwidth;  //在这儿设置图片宽度540

            var focus_height = picheight; //在这儿设置图片高度185

            var text_height = textheight;   //在这儿设置文本高度18

            var swf_height = focus_height + text_height;
            
            document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
            document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="http://www.86mt.com/XianXian/js/flashplayer.swf"><param name="quality" value="high"><param name="bgcolor" value="#ffffff">');
            document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
            document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
            document.write('<embed wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#EBF3FA" quality="high" width="'+ focus_width +'" height="'+ focus_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
            document.write('</object>');
        } 

    function copy_url(text)
    {
        try
        {
            clipboardData.setData('Text', text);
            window.alert("地址已复制到剪贴板！");
        }
        catch(e)
        {
        }
    }

    function hideAllClips(clip,box,n,m) { 
        for (i=1; i<(m+1); i++){ 
            var allClips=box.toString()+i; 
            var clipNum=clip.toString()+i; 
            //alert("隐藏"+allClips); 
            //if(i=n) break; 
            document.getElementById(allClips).style.display="none"; 
            document.getElementById(clipNum).className="topnavoff"; 
        } 
    }      
    function clip_Switch(clip,box,n,m) { 
        var curClip=box.toString()+n; 
        var curClipNum=clip.toString()+n; 
        //alert("当前"+curClip); 
        hideAllClips(clip,box,n,m); 
        document.getElementById(curClip).style.display="block"; 
        document.getElementById(curClipNum).className="topnavon"; 
        scrollNo=n; 
    } 
    
    function hideAllClips2(clip,box,n,m) { 
        for (i=1; i<(m+1); i++){ 
            var allClips=box.toString()+i; 
            var clipNum=clip.toString()+i; 
            //alert("隐藏"+allClips); 
            //if(i=n) break; 
            document.getElementById(allClips).style.display="none"; 
            document.getElementById(clipNum).className="topnavoff2"; 
        } 
    }      
    function clip_Switch2(clip,box,n,m) { 
        var curClip=box.toString()+n; 
        var curClipNum=clip.toString()+n; 
        //alert("当前"+curClip); 
        hideAllClips(clip,box,n,m); 
        document.getElementById(curClip).style.display="block"; 
        document.getElementById(curClipNum).className="topnavon2"; 
        scrollNo=n; 
    }  
