function InitializeRequest(sender, args) {

    if (document.getElementById('ProgressDiv') != null)

        $get('ProgressDiv').style.display = 'block';

    else

        createContorl();

}



function EndRequest(sender, args) {

    if (document.getElementById('ProgressDiv') != null)

        $get('ProgressDiv').style.display = 'none';

    else

        createContorl();
}



function SetScroll(lb, SelInd) {

if (document.getElementById(lb)) { 
    document.getElementById(lb).selectedIndex=SelInd ; }
}


function preloadFlash() {
    Preload01 = new Image();
    Preload01.src = "FaQxeJY6mTQ=/ajax-loader.gif";
} 

var HeartBeatTimer;

function StartHeartBeat() {
    // pulse every 10 seconds
    if (HeartBeatTimer == null)
        HeartBeatTimer = setInterval("HeartBeat()", 1000 * 10);
}

function HeartBeat() {
    // note: ScriptManger must have: EnablePageMethods="true"    
    PageMethods.PokePage();
}



function ChangeChkForecolor() {
    if (document.getElementById("chkActive").checked = "false") {
        document.getElementById("chkActive").color = "Red";

    } else {
        document.getElementById("chkActive").color = "Green";
    }
}


function NavigateHome() {
    javascript: window.open("http://www.findjobz.com");
}



function OpenPage(link) {
    javascript: window.open(link);
}

function Navigate() {
    javascript: window.open("http://www.rateitcompanies.com");
}

function NavigateIndeed(link) {
    javascript: window.open(link);
}    



function GetImageWAndH(imgName) {
        var w
        var h
        var img
        
        img = document.getElementById(imgName)
    
        w = img.width
        h = img.height
        alert("pic width=" + img.width + " pic height=" + img.height);
        img.width = (w / 2)
        img.height = (h / 2)
        alert("pic width=" + img.width + " pic height=" + img.height);        
    }    


function GetTextBoxValue(id)
        {
            return(document.getElementById(id).value);
        }

function ShowDateChooser(Src) {        
        window.open("DateChooser.aspx?src=" + Src, "_blank",    
            "height=210, width=250, left=200, top=200, " +   
            "location=no, menubar=no, resizable=no, " +   
            "scrollbars=no, titlebar=no, toolbar=no", true) ;
    }
       
function CheckOtherIsCheckedByGVID(spanChk,gv)
       {             
           var IsChecked = spanChk.checked;         
           if(IsChecked)
              {
               spanChk.parentElement.parentElement.style.backgroundColor='#228b22';  
               spanChk.parentElement.parentElement.style.color='white'; 
              }                    
              
           var CurrentRdbID = spanChk.id;    
           var Chk = spanChk;
           Parent = document.getElementById(gv);           
              var items = Parent.getElementsByTagName('input');                    

              for(i=0;i<items.length;i++)
              {                
                  if(items[i].id != CurrentRdbID && items[i].type=="radio")
                  {            
                      if(items[i].checked)
                      {     
                          items[i].checked = false;
items[i].parentElement.parentElement.style.backgroundColor='#CCCCCC'; 
items[i].parentElement.parentElement.style.color='black';}
                  }
              }
       }


function ClearCheckedOptions() {
           Parent = document.getElementById('gvCoverLetters');
           var items = Parent.getElementsByTagName('input');

           for (i = 0; i < items.length; i++) {
               items[i].checked = false;
               items[i].parentElement.parentElement.style.backgroundColor = '#CCCCCC';
               items[i].parentElement.parentElement.style.color = 'black';
           }

       }

function StartFunction() {
        maximizewindow()
    }




    function SetTextToNothing(txt) {
        document.getElementById(txt).value='';
    }



    function ShowDiv(divtoshow) {
        document.getElementById(divtoshow).style.display = 'block';
    }



    function HideDiv(divtohide) {

        document.getElementById(divtohide).style.display = 'none';
    }

    

function maximizewindow()
{
    if (window.screen) {
        this.moveTo(0, 0);
        this.resizeTo(screen.availWidth,screen.availHeight)
        
    }
}

function maximizewindow75Width()
{
    if (window.screen) {
        this.moveTo(0, 0);
        this.resizeTo(screen.availWidth/1.5,screen.availHeight)
    }
}

function countDown(control, maxLen, counter, typeName) {
     var len = control.value.length;
     var txt = control.value;
     var span = document.getElementById(counter);
     span.style.display = '';
     span.innerHTML = (maxLen - len) + ' characters remaining';
     if (len >= (maxLen - 10)) {
          span.style.color = 'red';
          if (len > maxLen) {
               control.innerHTML = txt.substring(0, maxLen);
               span.innerHTML = (maxLen - control.value.length) + ' characters remaining';               
          }
     } else {
          span.style.color = '#000000';
     }
}


function WarnBadWords() {
        return confirm("There are Prohibited Words in your comment that will be replaced.  Do you wish to Edit your Comment?");
    }

function RaiseAlert(Alert,Source){
    alert(alert + ' -- '+ source);
    }


    function MoveToLocation(location) 
    {
        window.location='#' + location;
        }    



        /*
        // ///////////////////////////
        // checkCapsLock v1.0
        // 
        // If a user enters his password in a Web-based form with Caps Lock 
        // accidentally on, he can become frustrated because his password is not 
        // being accepted... and he may assume the application is the source of the 
        // problem.
        // 
        // This JavaScript function will let the user know his Caps Lock is on and 
        // about the potential for error.
        // ///////////////////////////
        */

            function checkCapsLock(e,lbl) {
                var myKeyCode = 0;
                var myShiftKey = false;
                var labelCaps = lbl
                var isIE4 = document.all;
                var isNS4 = document.layers;
                var isNS6 = document.getElementById && !document.all;
                var M_Hide = isNS4 ? 'hide' : 'hidden';
                var M_Show = isNS4 ? 'show' : 'visible';


                // Internet Explorer 4+
                if (document.all) {
                    myKeyCode = e.keyCode;
                    myShiftKey = e.shiftKey;

                    // Netscape 4
                } else if (document.layers) {
                    myKeyCode = e.which;
                    myShiftKey = (myKeyCode == 16) ? true : false;

                    // Netscape 6
                } else if (document.getElementById) {
                    myKeyCode = e.which;
                    myShiftKey = (myKeyCode == 16) ? true : false;

                }

                // Upper case letters are seen without depressing the Shift key, therefore Caps Lock is on
                if ((myKeyCode >= 65 && myKeyCode <= 90) && !myShiftKey) {

                    document.getElementById(labelCaps).style.visibility = M_Show;

                    // Lower case letters are seen while depressing the Shift key, therefore Caps Lock is on
                } else if ((myKeyCode >= 97 && myKeyCode <= 122) && myShiftKey) {

                    document.getElementById(labelCaps).style.visibility = M_Show;


                } else if ((myKeyCode >= 97 && myKeyCode <= 122) ) {
                    document.getElementById(labelCaps).style.visibility = M_Hide;
                }
            }
