function openWin(url) {
    win = window.open(url,"url","width=600, height=400, \
    location=yes, menubar=yes, status=yew, toolbar=yes, scrollbars=yes, resizable=yes, left=50,top=50")
}

/** 
* Toggle a hidden element. Reference 
*/
function hideShow(zap) {
    if (document.getElementById) {
        var el = document.getElementById(zap).style;
        if (el.display == "block") {
            el.display = "none";
        } else {
            el.display = "block";
        }
        return false;
    } else {
        return true;
    }
}


function checkSearchForm(form) { 
    // validation fails if the input is blank 
    if(form.kw.value == '') { 
        alert('Error: Input is empty!'); 
        form.kw.focus();  
        return false;  
    } 
    // regular expression to match alphanumeric characters and spaces 
    var re = /^[\w ]+$/; 
    // validation fails if the input doesn't match the regular expression 
    if(!re.test(form.kw.value)) { 
        alert('Error: Input contains invalid characters!'); 
        form.kw.focus();  
        return false;  
    } // validation was successful  
    return true;  
} 
