//<script type="text/javascript" language="javascript">
    function ShowDiv(Obj)
    {
    var Div_ID=document.getElementById(Obj);
    Div_ID.style.display="";
    Div_ID.style.zIndex=9;
    }
    
    function HideDiv(Obj)
    {
     var Div_ID=document.getElementById(Obj);
     Div_ID.style.display="none";
     Div_ID.style.zIndex=0;
    }
    
//    </script>

//    <script language="javascript" type="text/javascript">
//<![CDATA[
function showsub(btnid,tabid,tabnumber)
{
 for (i = 0;i<tabnumber;i++)
 {
  document.getElementById("tab"+tabid+"_subdiv"+i).style.display = "none";
  document.getElementById("tab_tuijian_btn" + i).style.backgroundImage ='url(Images/Head30.gif)'; 
 }
 document.getElementById("tab"+tabid+"_subdiv"+btnid).style.display = "";
 document.getElementById("tab_tuijian_btn" + btnid).style.backgroundImage ='url(Images/Head30_1.gif)'; 
 
}

//]]>



//<![CDATA[
function subshow(btnid,tabid,tabnumber)
{
 for (i = 0;i<tabnumber;i++)
 {
  document.getElementById("tab"+tabid+"_subdiv"+i).style.display = "none";
  document.getElementById("tab_tuijian_btn" + i).style.backgroundImage ='url(Images/Head30.gif)'; 
 }
 document.getElementById("tab"+tabid+"_subdiv"+btnid).style.display = "";
 document.getElementById("tab_tuijian_btn" + btnid).style.backgroundImage ='url(Images/Head30_1.gif)'; 
 
}
//]]>
//    </script>

//    <script language="javascript" type="text/javascript">

var baseText = null; 
function ShowPopup(w,h,DivID)
{
    var popUp = document.getElementById(DivID);
    
    //相对高       
    popUp.style.top = "1400px";  
    popUp.style.left = "600px"; 
    popUp.style.width = w + "px";  
    popUp.style.height = h + "px";  
    if (baseText == null) baseText = popUp.innerHTML; 
    popUp.innerHTML = baseText +  "<div id=\"statusbar\"><input type=\"button\" value=\"Close window\" onClick=\"hidePopup("+DivID+");\"></div>";   
    var sbar = document.getElementById("statusbar");
       sbar.style.marginTop = (parseInt(h)-60) + "px";  
    popUp.style.visibility = "visible";
}

function hidePopup(DivID)
{ 
 var popUp = document.getElementById(DivID);   
  popUp.style.display = "none";
 
 }
 
 
//    </script>

//    <script type="text/javascript" language="javascript">
var $ = function(element)
{return document.getElementById(element)?document.getElementById(element):document.all(element);};
var Q=function(id){$("disp"+id).style.display=$("disp"+id).style.display==""?"none":"";};

var x=1;
function change()
{
var div1,div2;
div1=document.getElementById("list1");
div2=document.getElementById("list2");
if (x==1)
{
div1.style.display='none';
div2.style.display='';
x=2;
}
else
{
div1.style.display='';
div2.style.display='none';
x=1;
}
}

function ChangeTime()
{
window.setInterval("change()", 18000);
}

//    </script>



//<script language="JavaScript" type="text/JavaScript"> 
function validateCNDate( strValue ) { 
        var objRegExp = /^\d{4}(\-|\/|\.)\d{1,2}\1\d{1,2}$/ 

        if(!objRegExp.test(strValue)) 
        return false;  
        else{ 
        var arrayDate = strValue.split(RegExp.$1);  
        var intDay = parseInt(arrayDate[2],10); 
        var intYear = parseInt(arrayDate[0],10); 
        var intMonth = parseInt(arrayDate[1],10); 
        if(intMonth > 12 || intMonth < 1) { 
        return false; 
        } 
        var arrayLookup = { '1' : 31,'3' : 31, '4' : 30,'5' : 31,'6' : 30,'7' : 31, 
        '8' : 31,'9' : 30,'10' : 31,'11' : 30,'12' : 31} 
        if(arrayLookup[parseInt(arrayDate[1])] != null) { 
        if(intDay <= arrayLookup[parseInt(arrayDate[1])] && intDay != 0) 
        return true;  
        } 
        if (intMonth-2 ==0) { 
        var booLeapYear = (intYear % 4 == 0 && (intYear % 100 != 0 || intYear % 400 == 0)); 
        if( ((booLeapYear && intDay <= 29) || (!booLeapYear && intDay <=28)) && intDay !=0) 
        return true; 
        } 
        } 
        return false;  
        } 
        
function checkInput()
{
        if (form1.txbS.value.replace(/^\s*/,'').replace(/\s*$/,'')=="")
		{
			alert("模特档期起始时间不能为空!");
			form1.txbS.focus();
			return false;
		}
		
		if(!validateCNDate(form1.txbS.value.replace(/^\s*/,'').replace(/\s*$/,'')))
		{
		   alert("模特档期起始时间,格式不正确!");
			form1.txbS.focus();
			return false;
		}
		if (form1.txbE.value.replace(/^\s*/,'').replace(/\s*$/,'')=="")
		{
			alert("模特档期结束时间不能为空!");
			form1.txbE.focus();
			return false;
		}
		
		if(!validateCNDate(form1.txbE.value.replace(/^\s*/,'').replace(/\s*$/,'')))
		{
		    alert("模特档期结束时间,格式不正确!");
			form1.txbE.focus();
			return false;
		}
 } 
 /*上半部搜索模特时检查时间是否为空*/
 function chkDate1()
{
        if (form1.startdate.value.replace(/^\s*/,'').replace(/\s*$/,'')=="")
		{
			alert("起始时间不能为空!");
			form1.startdate.focus();
			return false;
		}
		
		if(!validateCNDate(form1.startdate.value.replace(/^\s*/,'').replace(/\s*$/,'')))
		{
		   alert("起始时间,格式不正确!");
			form1.startdate.focus();
			return false;
		}
		if (form1.EndDate.value.replace(/^\s*/,'').replace(/\s*$/,'')=="")
		{
			alert("结束时间不能为空!");
			form1.EndDate.focus();
			return false;
		}
		
		if(!validateCNDate(form1.EndDate.value.replace(/^\s*/,'').replace(/\s*$/,'')))
		{
		    alert("结束时间,格式不正确!");
			form1.EndDate.focus();
			return false;
		}
 } 
 
 /*登录检测*/
 function login(){
    var name = form1.txbUserName.value.replace(/^\s*/,'').replace(/\s*$/,'');
    var pwd = form1.txbUserPwd.value.replace(/^\s*/,'').replace(/\s*$/,'');
    if(name=="" && pwd==""){
        window.location.href="http://www.chinaeve.com/PlatForm/Login.aspx?msg=index";
        return false;
    }else{
        if(name=="" || pwd==""){
            if(name==""){
                alert("用户名不能为空");
                form1.txbUserName.focus();
            }
            if(pwd==""){
                alert("密码不能为空");
                form1.txbUserPwd.focus();
            }
            return false;
        }
    }
 }
		
function resizepic(o) 
{ 

var MaxPx=50; 
var c;
var d; 
var a=new Image(); 
a.src=o.src ;
var i;
for(i=0;i<20;i++)
{

if(a.width >= a.height)
{

if (a.width/i<=MaxPx && a.height/i<=MaxPx)
{
//o.style.width=a.width/i;
c=a.width/MaxPx;
o.style.width=MaxPx;
o.style.height=a.height/c;
break;
}
}


if(a.width < a.height)
{
if (a.width/i<=MaxPx && a.height/i<=MaxPx)
{
//o.style.width=a.width/i;
d=a.height/MaxPx;
o.style.width=a.width/d;
o.style.height=MaxPx;
break;
}
}
}
}
function resizepic1(o) 
{ 
var MaxPx=100; 
var c;
var d; 
var a=new Image(); 
a.src=o.src ;
var i;
for(i=0;i<20;i++)
{
if(a.width >= a.height)
{
if (a.width/i<=MaxPx && a.height/i<=MaxPx)
{
//o.style.width=a.width/i;
c=a.width/MaxPx;
o.style.width=MaxPx;
o.style.height=a.height/c;
break;
}
}

if(a.width < a.height)
{
if (a.width/i<=MaxPx && a.height/i<=MaxPx)
{
//o.style.width=a.width/i;
d=a.height/MaxPx;
o.style.width=a.width/d;
o.style.height=MaxPx;
break;
}
}
}
}
function resizepicDY(o) 
{ 
var MaxPx=106; 
var c;
var d; 
var a=new Image(); 
a.src=o.src ;
var i;
for(i=0;i<20;i++)
{
if(a.width >= a.height)
{

if (a.width/i<=MaxPx && a.height/i<=MaxPx)
{
//o.style.width=a.width/i;
c=a.width/MaxPx;
o.style.width=MaxPx;
o.style.height=a.height/c;
break;
}
}

if(a.width < a.height)
{
if (a.width/i<=MaxPx && a.height/i<=MaxPx)
{
//o.style.width=a.width/i;
d=a.height/MaxPx;



o.style.width=a.width/d;
o.style.height=MaxPx;
break;
}
}


}

}
//</script>

//<script type="text/javascript">
      //DoubleUp configuration
        var DP_IMG_DIR = "doubleup/";
        var DU_HEIGHT = 710;
        var DU_WIDTH = 720;
        function getDUHeight() { return DU_HEIGHT; }
        function getDeliUser() { return "amix"; }

      //GreyBox configuration
        var GB_IMG_DIR = "greybox/";
        var GB_ANIMATION = true;
        var GB_overlay_click_close = true;
//    </script>
