function changeBtn(mode,documentid,path) {
	switch(mode) {
		case 0:
			document.getElementById(documentid).src = path;
			break;
		case 1:
			document.getElementById(documentid).src = path;
			break;
	}
}


/*
function errorhandling () {
  return true;
}
window.onerror = errorhandling;

*/

//popUp('http://www..','winName','width','height','toolbar=0','directories=0','status=0','menubar=0','scrollbars=0','resizable=0','loffset=0')

function popUp(theurl,winName,wi,he,toolbar,directories,status,menubar,scrollbars,resizable,loffset) {

   openquery = "width="+wi+",height="+he+",toolbar="+toolbar+",directories="+directories+",status="+status+",menubar="+menubar+",scrollbars="+scrollbars+",resizable="+resizable+",top=" +((screen.height/2)-(he/1.5))+ ",screenY=" +((screen.height/2)-(he/1.5))+ ",left=" +((screen.width/2)-(wi/2)+loffset)+ ",screenX=" +((screen.width/2)-(wi/2));
	
   newwin = window.open(theurl,winName,openquery);
  
   newwin.focus();

}