﻿
// JScript 文件

function gotourl() {
    var theURL = page_form.qxlw.value;
    if (theURL == "") return false;
    window.open(theURL);
}

function resetKeys(s) {
    if (page_form.keys.value == s)
        page_form.keys.value = "";
}


function restoreKeys(s) {
    if (page_form.keys.value == "")
        page_form.keys.value = s;
}

function gosearch(s) {
    if (page_form.keys.value == "" || page_form.keys.value == s) {
        alert(s);
        page_form.keys.focus();
        return false;
    }
    document.getElementById("wkregion").value = document.getElementById("apply_wkregion").value;
    //document.getElementById("postp").value="";
    return true;
}

function forgetPwd() {
    window.open("/Personal/Center/forgetPwd.aspx", "forgetPwd", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=420,height=170,top=250,left=250");
    return false;
}

function login(s) {
    if (document.page_form.TextBox_userid.value.length < 1 || document.page_form.TextBox_userid.value.length > 20 || document.page_form.TextBox_userid.value == s) {
        alert("请正确输入您的用户名!");
        document.page_form.TextBox_userid.focus();
        return false;
    }
    else if (document.page_form.TextBox_pwd.value.length < 4 || document.page_form.TextBox_pwd.value.length > 20) {
        alert("请正确输入您的密码!");
        document.page_form.TextBox_pwd.focus();
        return false;
    }
    return true;
}



function linkit(TheURL) {
    if (TheURL == "0")
        document.getElementById("postp").value = page_form.select_postp.value;
    else
        document.getElementById("postp").value = TheURL;

    if (page_form.postp.value != "") {
        document.getElementById("keys").value = "";
        page_form.action = "/Personal/findJob/searchResult.aspx";
        page_form.method = "post";
        page_form.target = "_auto";
        page_form.submit();
    }
    else
        return false;

}

function setfoucs(id) {
    document.getElementById(id).focus();
}


function resetKeys1(s) {

    //alert(page_form.TextBox_userid.value);
    if (page_form.TextBox_userid.value == s)
        page_form.TextBox_userid.value = "";
}


function restoreKeys1(s) {
    if (page_form.TextBox_userid.value == "")
        page_form.TextBox_userid.value = s;
}

function resetKeys2(s) {
    if (page_form.keys.value == s)
        page_form.keys.value = "";
}

$(document).ready(function() {
    var bro = $.browser;

    if (bro.msie) {
        $("#img1").addClass("img1");
        $("#img2").addClass("img1");
    }
    if (bro.mozilla) {
        $("#img1").addClass("img2");
        $("#img2").addClass("img2");
    }
    if (bro.safari) {
        $("#img1").addClass("img3");
        $("#img2").addClass("img3");
    }
    if (bro.opera) {
        $("#img1").addClass("img4");
        $("#img2").addClass("img4");
    }

    $("#keys").bind("focus", function() {
        var str = $("#keys").val();
        if (str == "请输入关键字！") {
            $("#keys").val("");
        }
    });


    $("#keys").bind("blur", function() {
        var str = $("#keys").val();
        if (str.trim().length == 0) {
            $("#keys").val("请输入关键字！");
        }
    });

    $("#TextBox_userid").bind("focus", function() {        
        var str = $("#TextBox_userid").val();
        if (str.trim() == "个人用户名！") {
            $("#TextBox_userid").val("");
        }
    });

    $("#TextBox_userid").bind("blur", function() {
        var str = $("#TextBox_userid").val();
        if (str.trim().length == 0) {
            $("#TextBox_userid").val("个人用户名！");
        }
    });
});


function restoreKeys2(s) {
    if (page_form.keys.value == "")
        page_form.keys.value = s;
}

function resetKeys3(s) {

    if (page_form.TextBox_Poskey.value == s)
        page_form.TextBox_Poskey.value = "";
}


function restoreKeys3(s) {
    if (page_form.TextBox_Poskey.value == "")
        page_form.TextBox_Poskey.value = s;
}

