function noError(){return true;}
window.onerror = noError;

function popUp(page,PWidth,PHeight,id) {
 eval("popupwindow"+id+"=window.open('"+page+"','popupwindow1','toolbar=0,scrollbars=0,location=0,status=0,menubars=0,resizable=0,width="+PWidth+",height="+PHeight+"'); popupwindow"+id+".focus();")
 eval;("wiz"+id+".window.moveTo((screen.width/2)-(PWidth/2),(screen.height/2)-(PHeight/2))")
}

function update_stats( source, destination ) {
 document.getElementById(destination).innerHTML = document.getElementById(source).innerHTML;      
}

 function toggleLayer( whichLayer ) {  
   var elem, vis;
   if( document.getElementById ) 
    elem = document.getElementById( whichLayer );
   else if( document.all )
    elem = document.all[whichLayer];
   else if( document.layers )
    elem = document.layers[whichLayer];
   vis = elem.style;
   if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined) 
     vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
   vis.display = (vis.display==''||vis.display=='block')?'none':'block';  
}


function submitonce(theform){
//if IE 4+ or NS 6+
if (document.all||document.getElementById){
//screen thru every element in the form, and hunt down "submit" and "reset"
for (i=0;i<theform.length;i++){
var tempobj=theform.elements[i]
if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
//disable em
tempobj.disabled=true
}
}
}


function imposeMaxLength(Object, MaxLen)
{
  return (Object.value.length <= MaxLen);
}

/* ------ Added By Ashish For allaow Int Only -----*/
function intOnly(i) {
	if(i.value.length>0) {
		i.value = i.value.replace(/[^\d]+/g, '');
	}
}
