﻿// JScript 文件

function Login()
{
    if(document.getElementById("ctl00_ContentPlaceHolder1_Login1_txtUserName").value=="")
    {
     alert("请输入会员名");
     document.getElementById("ctl00_ContentPlaceHolder1_Login1_txtUserName").focus();
     return false;
    }
    if(document.getElementById("ctl00_ContentPlaceHolder1_Login1_txtPwd").value=="")
    {
     alert("请输入密码");
     document.getElementById("ctl00_ContentPlaceHolder1_Login1_txtPwd").focus();
     return false;
    }
    return true;
}

function check()
{
if(document.getElementById("ctl00_ContentPlaceHolder1_txtTitle").value=="")
{
 alert("请输入标题");
 document.getElementById("ctl00_ContentPlaceHolder1_txtTitle").focus();
 return false;
}
if(document.getElementById("ctl00_ContentPlaceHolder1_txtContent").value=="")
{
 alert("请输入内容");
 document.getElementById("ctl00_ContentPlaceHolder1_txtContent").focus();
 return false;
}
return true;
}


function save()
{
    window.external.AddFavorite('http://www.realtinstrument.com','成都市容特仪器仪表有限公司');
}

function showsub(tname,cur,tabnumber)
{
	for (i = 0;i<tabnumber;i++)
	{
		document.getElementById(tname+"_"+i).style.display = "none";
	}
	document.getElementById(tname+"_"+cur).style.display ="block";
}
      
        function play_images(pics, links, texts,picwidth,picheight,textheight)
        {
            var focus_width = picwidth;
            var focus_height = picheight
            var text_height = textheight;
            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://localhost:8082/realt/js/flashplayer.swf"><param name="quality" value="high"><param name="bgcolor" value="#e5e5e5">');
            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 read(label,uid)
{
if(label=="1")
{
if(uid>0)
{
return true;
}
else
{
if(confirm("对不起,该信息只有本站会员才能查看，选择[是]进行登录或注册！"))
{
location.href='default.aspx';
}
return false;
}
}
return true;
}

   
function hideAllClips_vide(clip,box,n,m) { 
    for (i=1; i<(m+1); i++){ 
        var allClips=box.toString()+i; 
        var clipNum_vide=clip.toString()+i;
        document.getElementById(allClips).style.display="none"; 
        document.getElementById(clipNum_vide).className="topnav_vide_on"; 
        } 
    }      
function clip_Switch_vide(clip,box,n,m) { 
    var curClip=box.toString()+n; 
    var curclipNum_vide=clip.toString()+n;
    hideAllClips_vide(clip,box,n,m); 
    document.getElementById(curClip).style.display="block"; 
    document.getElementById(curclipNum_vide).className="topnav_vide_off"; 
    scrollNo=n; 
    }
