// =================== General Java Functions for website www.Mk2consulting.nl ==========


var sHost = this.location.host;

// ==================== begin: error and security functions. ====================

// This function blocks the printing the screen

function setClipBoardData(){
     setInterval("window.clipboardData.setData('text','')",20);
}

// This function handles error

function blockError(){
     window.location.reload(true);
     return true;
}
window.onerror = blockError;



// ==================== begin: open page functions. ====================

function FP_openNewWindow(w,h,nav,loc,sts,menu,scroll,resize,name,url) {//v1.0
			 var windowProperties=''; if(nav==false) windowProperties+='toolbar=no,'; else
			  windowProperties+='toolbar=yes,'; if(loc==false) windowProperties+='location=no,'; 
			 else windowProperties+='location=yes,'; if(sts==false) windowProperties+='status=no,';
			 else windowProperties+='status=yes,'; if(menu==false) windowProperties+='menubar=no,';
			 else windowProperties+='menubar=yes,'; if(scroll==false) windowProperties+='scrollbars=no,';
			 else windowProperties+='scrollbars=yes,'; if(resize==false) windowProperties+='resizable=no,';
			 else windowProperties+='resizable=yes,'; if(w!="") windowProperties+='width='+w+',';
			 if(h!="") windowProperties+='height='+h; if(windowProperties!="") { 
			  if( windowProperties.charAt(windowProperties.length-1)==',') 
			   windowProperties=windowProperties.substring(0,windowProperties.length-1); } 
			 window.open(url,name,windowProperties);
			}

function shrinktofit() {
					var image = document.images.FullImage;
					var w = image.width;
					var h = image.height+39;
		
					
					if((!document.layers) && (navigator.userAgent.indexOf('Netscape')!=-1)) {
						w += 7;
						h += 24;
					}
		
					window.resizeTo(w,h);
					if(document.body && document.body.clientWidth)
						window.resizeBy(image.width-document.body.clientWidth,image.height-document.body.clientHeight+39)
					
				}
// ==================== begin: Help functions. ====================

function showHelpItem(id_helpicon, id_helpdiv) {
 
showHelpItemExtra(id_helpicon, id_helpdiv, 0);
}

function showHelpItemExtra(id_helpicon, id_helpdiv, start_ypos) {
        var xpos, ypos;
        if (navigator.appName == 'Netscape') {
            xpos = (window.outerWidth-400)/2;
            ypos = (window.outerHeight-350)/2;
        } else {
            xpos = document.getElementById(id_helpdiv).offsetLeft + 600;
            ypos = document.getElementById(id_helpdiv).offsetTop + start_ypos;
        }
        
        document.getElementById(id_helpicon).style.top = ypos+'px';
        document.getElementById(id_helpicon).style.left = xpos+'px';
        document.getElementById(id_helpicon).style.visibility = 'visible';
}

function hideHelpItem(id_helpicon) {
        document.getElementById(id_helpicon).style.visibility='hidden';
}

