//分页跳转事件
function gotoPage(url,page){
    var strURL=url+page;
    window.parent.main.document.location.replace(strURL);
    //window.parent.main.location = strURL;
}
function gotoPageFace(url,page){
    var strURL=url+page;
    window.parent.document.location.replace(strURL);
    //window.parent.main.location = strURL;
}
//产品图片转换
function ChangePicture(newPic)
{ 
    if (newPic == "") return ;
    if (document.getElementById("bigimg").src == newPic) return;
    document.getElementById("bigimg").src = newPic;
}

//分页跳转事件
function gotoFacePage(url,page){
    var strURL=url+page;
    window.parent.document.location.replace(strURL);
    //window.parent.main.location = strURL;
}
//刷新当前页面
function refreshopage()   
{   
    window.location.reload();   
} 
//返回上一步
function goBack(){
    history.back(-1); 
}


//卡片效果
function setTab(area,id) {
    var tabArea=document.getElementById(area);
    
    var contents=tabArea.childNodes;
    for(i=0; i<contents.length; i++) {
        if(contents[i].className=='left_content_tab'){contents[i].style.display='none';}
    }
    document.getElementById(id).style.display='';
    
    var tabs=document.getElementById(area+'Tabs').getElementsByTagName('li');
    for(i=0; i<tabs.length; i++) { tabs[i].className='blank'; }
    document.getElementById(id+'Tab').className='leftTab';
}

//复制网址
function copyURL() {
    var url = location.href;
    window.clipboardData.setData("Text",url);
    alert("该网页链接地址已复制，您可以粘贴(快截键CTRL+V)在需要的地方");
}


//卡片效果
//area 显示内容的区域值,根据此值获得所有的ID号
//contentId 每块内容的ID号,以此来显示该块的内容
//listContentStyle 每块内容的class名称

//卡片的最大标签名称规则xxxTabs
//每个卡片的命名规则xxxTab
//blankStyle 卡片没有选择时的样式效果
//selectStyle 卡片选择的样式效果
//byTagName 卡片标签名称,根据此还设计卡片的选择状态
function setPublicTab(area,contentId,listContentStyle,blankStyle,selectStyle,byTagName) {
    var tabArea=document.getElementById(area);
    
    var contents=tabArea.childNodes;
    for(i=0; i<contents.length; i++) {
        if(contents[i].className==listContentStyle){contents[i].style.display='none';}
    }
    document.getElementById(contentId).style.display='';
    
    var tabs=document.getElementById(area+'Tabs').getElementsByTagName(byTagName);
    for(i=0; i<tabs.length; i++) { tabs[i].className=blankStyle; }
    document.getElementById(contentId+'Tab').className=selectStyle;
}

function setSearchTab(area,contentId,listContentStyle,blankStyle,selectStyle,byTagName) {
    var tabArea=document.getElementById(area);
    
    var contents=tabArea.childNodes;
    for(i=0; i<contents.length; i++) {
        if(contents[i].className==listContentStyle){contents[i].style.display='none';}
    }
    document.getElementById(contentId).style.display='';
    
    var tabs=document.getElementById(area+'Tabs').getElementsByTagName(byTagName);
    for(i=0; i<tabs.length-1; i++) { tabs[i].className=blankStyle; }
    document.getElementById(contentId+'Tab').className=selectStyle;
}
//下拉跳转菜单
function MM_jumpMenu(targ,selObj,restore){ //v3.0
    eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
    if (restore) selObj.selectedIndex=0;
}
//加入收藏
function bookmarkit(){
    window.external.addFavorite('http://www.farmanl.com','法曼儿美体塑身内衣连锁加盟');
}
//设为首页
function setHome(obj){
    obj.style.behavior='url(#default#homepage)';
    obj.setHomePage('http://www.farmanl.com');
    return false;
}

//选项卡切换
function showTab(n1,n2){
    var h=document.getElementById("tab"+n1).getElementsByTagName("h3");
    var d=document.getElementById("tab"+n1).getElementsByTagName("div");
    for(var i=0;i<h.length;i++){
        if(n2-1==i){
            h[i].className+=" up";
            d[i].className+=" block";
        }
        else {
            h[i].className=" ";
            d[i].className=" ";
        }
    }
}
function showMenu(id){
    document.getElementById(id).style.display='';
    //alert(document.getElementById(id));
}
function closeOnline(id){
    document.getElementById(id).style.display='none';
    //alert(document.getElementById(id));
}
function dispalyArea(id,disId,buttonArea){
    document.getElementById(disId).style.display='none';
    document.getElementById(id).style.display='';
    document.getElementById(buttonArea).innerHTML="<img onclick=removeArea('"+id+"','"+disId+"','"+buttonArea+"'); src='../images/cancel.gif' alt='取消'/>";
    //alert(document.getElementById(id));
}
function removeArea(id,disId,buttonArea){
    document.getElementById(disId).style.display='';
    document.getElementById(id).style.display='none';
    document.getElementById(buttonArea).innerHTML="<img onclick=dispalyArea('"+id+"','"+disId+"','"+buttonArea+"'); src='../images/edit_button.gif' alt='编辑'/>";
}
//
function change_openblk(aa,bb){
    for(i=1;i<3;i++){
        document.getElementById("tit"+i).className="";
        document.getElementById("or_con"+i).style.display="none";
    }
    var aa=document.getElementById(aa);
    var bb=document.getElementById(bb);
    aa.className="on";
    bb.style.display="block";
    
    if (document.getElementById("cvOpenLang") != null)
        document.getElementById("cvOpenLang").style.display="none";
}

function ShowAndCloseIframe(resumeID,types)
{
    obj = document.getElementById("divCv");
    obj1 = document.getElementById("ifrCv");
    if(obj.style.display == 'none')
        {
            obj1.src='SetDefaultCv.jsp?resumeID='+resumeID+'&types='+types;
            obj.style.display = '';
            document.body.style.overflow = 'hidden';
            document.body.style.height = document.documentElement.clientHeight + 'px';
        }
        else
            {
                obj.style.display = 'none'
                document.body.style.overflow = '';
                obj1.src="";
                this.location.reload();
            }
        }
        
        function ShowAndClose(files,id,types)
        {
            obj = document.getElementById("divCv");
            obj1 = document.getElementById("ifrCv");
            if(obj.style.display == 'none')
                {
                    obj1.src=files+'?id='+id+'&types='+types+'&files='+files;
                    obj.style.display = '';
                    document.body.style.overflow = 'hidden';
                    document.body.style.height = document.documentElement.clientHeight + 'px';
                }
                else
                    {
                        obj.style.display = 'none'
                        document.body.style.overflow = '';
                        obj1.src="";
                        this.location.reload();
                    }
                }
                function ShowAndCloseSearch(files,id,types)
                {
                    obj = document.getElementById("divCv");
                    obj1 = document.getElementById("ifrCv");
                    if(obj.style.display == 'none')
                        {
                            obj1.src=files+'?id='+id+'&types='+types+'&files='+files;
                            obj.style.display = '';
                            document.body.style.overflow = 'hidden';
                            document.body.style.height = document.documentElement.clientHeight + 'px';
                        }
                        else
                            {
                                obj.style.display = 'none'
                                document.body.style.overflow = '';
                                obj1.src="";
                            }
                        }
                        function ShowAndCloseContent(files,id,types)
                        {
                            obj = document.getElementById("divCvCon");
                            obj1 = document.getElementById("ifrCvCon");
                            if(obj.style.display == 'none')
                                {
                                    obj1.src=files+'?id='+id+'&types='+types+'&files='+files;
                                    obj.style.display = '';
                                    document.body.style.overflow = 'hidden';
                                    document.body.style.height = document.documentElement.clientHeight + 'px';
                                }
                                else
                                    {
                                        obj.style.display = 'none'
                                        document.body.style.overflow = '';
                                        obj1.src="";
                                        this.location.reload();
                                    }
                                }
                                //ShowAndCloseVolume()在搜索批量设置中使用
                                function ShowAndCloseVolume(files,types)
                                {
                                    obj = document.getElementById("divCv");
                                    obj1 = document.getElementById("ifrCv");
                                    
                                    var inputObjects = document.getElementsByName("strArray");
                                    var arrayValues = "";
                                    for(var i = 0;i < inputObjects.length;i ++){
                                        if("strArray" == inputObjects[i].name && false != inputObjects[i].checked){
                                            arrayValues = arrayValues+inputObjects[i].value+",";
                                        }
                                    }
                                    if(obj.style.display == 'none')
                                        {
                                            obj1.src=files+'?arrayValues='+arrayValues+'&types='+types;
                                            obj.style.display = '';
                                            document.body.style.overflow = 'hidden';
                                            document.body.style.height = document.documentElement.clientHeight + 'px';
                                        }
                                        else
                                            {
                                                obj.style.display = 'none'
                                                document.body.style.overflow = '';
                                                obj1.src="";
                                                this.location.reload();
                                            }
                                        }
                                        
                                        
                                        //只是关闭透明层，在搜索条件选择中使用。
                                        function ShowAndClosebg()
                                        {
                                            obj = document.getElementById("divCvbg");
                                            
                                            if(obj.style.display == 'none')
                                                {
                                                    obj.style.display = '';
                                                    document.body.style.overflow = 'hidden';
                                                    document.body.style.height = document.documentElement.clientHeight + 'px';
                                                }
                                                else
                                                    {
                                                        obj.style.display = 'none'
                                                        document.body.style.overflow = '';
                                                    }
                                                }   
                                                function openWindow(url) { 
                                                    window.open(url, "newwindow", "height=600, width=585, toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, status=no");
                                                }
                                                function setArticle(mesNum,red){
                                                    document.getElementById("mesNum").innerHTML =mesNum;
                                                    document.getElementById("red").innerHTML =red;
                                                }
                                                
                                                //显示或关闭购物车
                                                function ShowAndCloseCar(files,id,types,comType)
                                                {
                                                    obj = document.getElementById("divCv");
                                                    obj1 = document.getElementById("ifrCv");
                                                    if(obj.style.display == 'none')
                                                        {
                                                            obj1.src=files+'?id='+id+'&types='+types+'&comType='+comType;
                                                            obj.style.display = '';
                                                            document.body.style.overflow = 'hidden';
                                                            document.body.style.height = document.documentElement.clientHeight + 'px';
                                                        }
                                                        else
                                                            {
                                                                obj.style.display = 'none'
                                                                document.body.style.overflow = '';
                                                                obj1.src="";
                                                                this.location.reload();
                                                            }
                                                        }
                                                        
                                                        //会员管理中心菜单链接
                                                        function ChangeLink(files,divId)
                                                        {
                                                            obj = document.getElementById(divId);
                                                            obj.src=files;
                                                        }
                                                        
                                                        