﻿// JScript 文件
function setcookies(){
     var group1=document.getElementById("RadioGroup1_0");
     var group2=document.getElementById("RadioGroup1_1");
     var group3=document.getElementById("RadioGroup1_2");
     var othercontent=document.getElementById("othercontent");
     
     if(group1.checked==true)
     {
        document.cookie = "userclass=" + escape ("高校老师(辅导员、就业中心老师等)") +"; path=/";
        window.location.href="UserDifficuties.aspx";
     }
     else
     {
        if(group2.checked==true)
        {
             document.cookie = "userclass=" + escape ("教育产品代理机构") +"; path=/";
             window.location.href="UserDifficuties.aspx";
        }
        else
        {
             if(group3.checked==true)
             {
                if(othercontent.value.length>0)
                {
                   document.cookie = "userclass=" + escape (othercontent.value) +"; path=/";
                   window.location.href="UserDifficuties.aspx";
                }
                else
                {
                   alert('请填写您的身份，再点击提交');
                }
             }
             else
             {
                alert('请选择您的身份，再点击提交');
             }
        }
     }
     
     //alert('123');
     
};

function setcookiescase(){
     var group1=document.getElementById("RadioGroup1_0");
     var group2=document.getElementById("RadioGroup1_1");
     var group3=document.getElementById("RadioGroup1_2");
     var othercontent=document.getElementById("othercontent");
     
     if(group1.checked==true)
     {
        document.cookie = "userclass=" + escape ("高校老师(辅导员、就业中心老师等)") +"; path=/";
        window.location.href="../UserDifficuties.aspx";
     }
     else
     {
        if(group2.checked==true)
        {
             document.cookie = "userclass=" + escape ("教育产品代理机构") +"; path=/";
             window.location.href="../UserDifficuties.aspx";
        }
        else
        {
             if(group3.checked==true)
             {
                if(othercontent.value.length>0)
                {
                   document.cookie = "userclass=" + escape (othercontent.value) +"; path=/";
                   window.location.href="../UserDifficuties.aspx";
                }
                else
                {
                   alert('请填写您的身份，再点击提交');
                }
             }
             else
             {
                alert('请选择您的身份，再点击提交');
             }
        }
     }
     
     //alert('123');
     
};


function setcookiesM(){
     var group1=document.getElementById("ctl00_RadioGroup1_0");
     var group2=document.getElementById("ctl00_RadioGroup1_1");
     var group3=document.getElementById("ctl00_RadioGroup1_2");
     var othercontent=document.getElementById("ctl00_othercontent");
     
     if(group1.checked==true)
     {
        document.cookie = "userclass=" + escape ("高校老师(辅导员、就业中心老师等)") +"; path=/";
        window.location.href="UserDifficuties.aspx";
     }
     else
     {
        if(group2.checked==true)
        {
             document.cookie = "userclass=" + escape ("教育产品代理机构") +"; path=/";
             window.location.href="UserDifficuties.aspx";
        }
        else
        {
             if(group3.checked==true)
             {
                if(othercontent.value.length>0)
                {
                   document.cookie = "userclass=" + escape (othercontent.value) +"; path=/";
                   window.location.href="UserDifficuties.aspx";
                }
                else
                {
                   alert('请填写您的身份，再点击提交');
                }
             }
             else
             {
                alert('请选择您的身份，再点击提交');
             }
        }
     }
     
     //alert('123');
     
};


 function solution(name, value){
     document.cookie = name + "=" + escape (value) +"; path=/";
     //alert('123');
     window.location.href="UserDifficuties.aspx";
};


 function setothertime(){
     var selecttime=document.getElementById("ctl00_ContentPlaceHolder1_selecttime");
     if(selecttime.value=="其他")
     {
         document.getElementById("ctl00_ContentPlaceHolder1_othertime").style.display="";
     }
     else
     {
         document.getElementById("ctl00_ContentPlaceHolder1_othertime").value="";
         document.getElementById("ctl00_ContentPlaceHolder1_othertime").style.display="none";
     }
};



/*输出提示*/
function shownotice(str)
{
   alert(str);
}

//弹出confirm，选择确定跳转到URL1，选择取消跳转到url2
function ShowInsertGroup(Info,url1,url2)
{
    if(confirm(Info))
    {
        window.location.href = url1;
    }
    else
    {
        window.location.href = url2;
    }
}
//弹出confirm，选择“确定”跳转到url1，选择“取消”不跳转
function ShowSendMessage(Info,url1)
{
    if(confirm(Info))
    {
        window.location.href = url1;
    }
}
//弹出alert提示，选择确定后跳转到url
function ShowAlert(Info,url)
{
    alert(Info);
    window.location.href = url;
}


//弹出confirm，选择确定跳转到URL1，选择取消跳转到url2
function ShowInsert(Info,url1)
{
    if(confirm(Info))
    {
        
    }
    else
    {
        window.location.href = url1;
    }
}

//收藏本站
function bookmark(title, url) {
  if (document.all)
    window.external.AddFavorite(url, title);
  else if (window.sidebar)
    window.sidebar.addPanel(title, url, "")
}


