/*function handleError(errType,errURL,errLineNumber){
	var theframe = document.getElementById('voteframe');	 	 
     if (null == theframe) return true;
     theframe.src = 'vote.php';
    return false;
}
window.onerror=handleError
*/
function isEmpty(obj){
    if (obj.value == '' || obj.value.substr(0) == ' ') return true; else return false;          
}
function expandFrame(framename, extraexpand) {
     var theframe = document.getElementById(framename);	 
	 //window.alert(extraexpand);
     if (null == theframe) return; 
	  theframe.style.height =extraexpand + 'px';// window.frames[framename].document.getElementById('thevotebottomdiv').offsetTop + extraexpand + 'px';
   } 
function expandSliderFrame(framename, extraexpand) {
     var theframe = document.getElementById(framename);
	 //window.frames[framename].document.getElementById('thebottomdiv').offsetTop
	 // if (null == theframe) return;    
       theframe.style.height =extraexpand+ 'px';//window.frames[framename].document.getElementById('thebottomdiv').offsetTop + extraexpand + 'px';
   }   
function NewWindow(mypage, myname, w, h, scroll, pos) {
    if (pos == "center") { LeftPosition = (screen.width) ? (screen.width - w) / 2 : 100; TopPosition = (screen.height) ? (screen.height - h) / 2 : 100; }
    settings = 'width=' + w + ',height=' + h + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=' + scroll + ',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
    win = window.open(mypage, myname, settings);
}
function hideObject(objid) {
    var obj = document.getElementById(objid);
    obj.style.display = 'none';
    obj.style.visibility = 'hidden';
}
function showObject(objid) {        
    var obj = document.getElementById(objid);
    obj.style.display = 'block';
    obj.style.visibility = 'visible';
}
function candidatesReady() {
    var voteframe = document.getElementById('voteframe');
    if (null == voteframe) return;
    voteframe.src = 'vote.php';   
}