﻿function initializePage() {

}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
    if (init == true) with (navigator) {
        if ((appName == "Netscape") && (parseInt(appVersion) == 4)) {
            document.MM_pgW = innerWidth; document.MM_pgH = innerHeight; onresize = MM_reloadPage;
        }
    }
    else if (innerWidth != document.MM_pgW || innerHeight != document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function confirm_delete() {
    if (confirm("Are you sure you want to delete this item?") == true)
        return true;
    else
        return false;
}
function confirm_withdraw() {
    if (confirm("Are you sure you want to withdraw your application? If you withdraw your application you will no longer be an applicant for this job.") == true)
        return true;
    else
        return false;
}
function confirm_deactivate() {
    if (confirm("IMPORTANT: Once you de-activate your application to an employer, that employer will not be able to find you in general searches and will have only limited access to data in your profile even if you applied to a job. You will also lose your Zapp to that employer and will not be able to reactive or reuse that Zapp.") == true)
        return true;
    else
        return false;
}

function confirm_logout() {
    if (confirm("Are you sure you want to log out?") == true)
        return true;
    else
        return false;
}


function ValidateSkill(source, arguments) {
    source = document.getElementById("Skills_ccSkill_DropDownList")
    if (source.value == '0') {
        arguments.IsValid = false;
    }
    else {
        arguments.IsValid = true
    }
}
function ClearExpected() {
    document.forms[0].txtExpectedDate.value = ""
}

function ValidateSkillSub(source, arguments) {
    source = document.getElementById("SkillsSub_ccSkill_DropDownList")
    if (source.value == '0') {
        arguments.IsValid = false;
    }
    else {
        arguments.IsValid = true
    }
}
function ClearExpected() {
    document.forms[0].txtExpectedDate.value = ""
}



function ClearExpiration() {
    document.forms[0].txtExpirationDate.value = ""
}

function ValidateTitle(source, arguments) {
    source = document.getElementById("Licensure:ccLicense:DropDownList");
    if (source.value == '-1') {
        arguments.IsValid = false;
    }
    else {
        arguments.IsValid = true;
    }
}

function ValidateCCLicense(source, arguments) {
    source = document.getElementById("Licensure:ccLicense_DropDownList")
    if (source.value == '-1') {
        arguments.IsValid = false;
    }
    else {
        arguments.IsValid = true
    }
}

function ValidateCollege(source, arguments) {
    source = document.getElementById("Education_ccCollege_DropDownList")
    if (source.value == '0') {
        arguments.IsValid = false;
    }
    else {
        arguments.IsValid = true
    }
}
function limitText(limitField, limitNum) {
    if (limitField.value.length > limitNum - 1) {
        return false;
    }
    else {
        return true;
    }
}


function popitup(url) {

    newwindow = window.open(url, 'name', 'height=350,width=800,scrollbars=yes');
    if (window.focus) { newwindow.focus() }
    return false;
}

function preventPaste(limitField, limitNum) {

    var CanInsertLength;
    var sData = window.clipboardData.getData("Text");
    var newData;

    CanInsertLength = limitNum - limitField.value.length;

    if (CanInsertLength <= 0) {
        return false;
    }
    else {
        newData = sData.substr(0, CanInsertLength);
        window.clipboardData.setData("Text", newData);
        return true;
    }

}

//rjs --4/25/2007
function stripHTML(html_string) {
    var stripped = html_string.replace(/(<([^>]+)>)/ig, "");
    return stripped;

} //end function-stripHTML 
