
	function getObj(name) {
		if (document.getElementById) {
			this.obj = document.getElementById(name);
			this.style = document.getElementById(name).style;
		} else if (document.all) {
			this.obj = document.all[name];
			this.style = document.all[name].style;
		} else if (document.layers) {
			this.obj = document.layers[name];
			this.style = document.layers[name];
		}
	}

	function getEl(name) {
		// modified by fred to return obj to caller
		var obj;
		
		if (document.getElementById) {
			obj = document.getElementById(name);
		} else if (document.all) {
			obj = document.all[name];
		} else if (document.layers) {
			obj = document.layers[name];
			obj.style = document.layers[name];
		}
		
		return obj;
	}

	function ShowHideMenu(whichone) {
		for (i=0; i<1; i++) {
			NavMenu = new getObj('Layer'+(i+3));
			if (((i+3)==whichone) && (whichone!=0)) {
				NavMenu.style.visibility="visible"
			} else {
				NavMenu.style.visibility="hidden"
			}
		}
	}
		
		function popMe(strUrl,strName,intWidth,intHeight)
			{
			var win=window.open(strUrl,''+strName,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width='+intWidth+',height='+intHeight+',top=100,left=100');
			}
		function popPic(dummy)
			{
			var win = window.open('img.asp?'+dummy,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
			}

		var sRepeat=null
		
		function doMarquee(dir, src, amount) {
		 if (window.document.readyState=="loading") 

		 // Amount is optional - default to 10 if not specified
		 if (amount==null) amount=10
		 // For each direction, increment and check if to start over
		 switch (dir) {
		  case "up":
		    document.all[src].style.pixelTop-=amount
		    if (-document.all[src].style.pixelTop>=document.all[src].offsetHeight)
		     document.all[src].style.pixelTop=document.all[src].offsetParent.offsetHeight
		    break;
		  case "down":
		    document.all[src].style.pixelTop+=amount
		    if (document.all[src].style.pixelTop>document.all[src].offsetParent.offsetHeight)
		     document.all[src].style.pixelTop = -document.all[src].offsetHeight
		    break;
		  case "left":
		    document.all[src].style.pixelLeft-=amount
		    if (-document.all[src].style.pixelLeft>=document.all[src].offsetWidth)
		     document.all[src].style.pixelLeft=document.all[src].offsetParent.offsetWidth
		    break;
		  case "right":
		    document.all[src].style.pixelLeft+=amount
		    if (document.all[src].style.pixelLeft>document.all[src].offsetParent.offsetWidth)
		      document.all[src].style.pixelLeft = -document.all[src].offsetWidth
		    break;
		 }
		}

		
	function showCardcover(pid,varid) {
		var win = window.open('store.showcard.asp?prodid=' + pid+'&varid='+varid,'showcardcover','width=400,height=200,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
	}				


	/*
	**
	** Below are the javascript function for handling cardinput
	**
	*/

	var strOldText=''
	var strErrorTextTooLong = 'Uw tekst is te lang!';
	var strErrorTextPressEnter = 'Druk op enter aan het einde van een regel!';
	
	function verifyTextareaLines(oInput, intValidationMaxLines, intValidationCharactersPerLine) {
		var lResult = true;
		
		var sString = oInput.value.replace(/\r\n/gm,'\n');
		sString = sString.replace(/\n$/,'');
		
		var rLines = sString.match(/^.*$/gm);
	
		if (rLines) {
			var i = 0;
			while (i < rLines.length && lResult) {
				if (rLines[i].replace(/[\r\n]/,"").length > intValidationCharactersPerLine)
					lResult = false;
				i++;
			}
			if (rLines.length > intValidationMaxLines)
				lResult = false;
		}
	
		NS6 = (!document.layers) && (navigator.userAgent.indexOf('Netscape')!=-1)?true:false;
		IE4plus = (document.all) ? true : false;
		MOZ = (navigator.userAgent.indexOf('Mozilla')!=-1)?true:false;
		IEMajor=0
		if (IE4plus) {
			var start = navigator.appVersion.indexOf("MSIE");
			var end = navigator.appVersion.indexOf(".",start);
			
			IEMajor = parseInt(navigator.appVersion.substring(start+5,end));
			IE5plus = (IEMajor>=5) ? true : false;
			
		}
		
				
		if ((IEMajor>4)||(NS6==true)||(MOZ==true)) {
			if (lResult == true) {
				var strText = "#000000";
				var strColour = "#FFFFFF";
			} else {
				var strText = "#E73039";
				var strColour = "#FFFFFF";
			}
			
			oInput.style.color = strText;
			oInput.style.background = strColour;
	
			document.getElementById('errormsg').style.visibility = (lResult) ? 'hidden':'';
			
			if (!lResult) {
				document.getElementById('errormsg').innerText = 
					(rLines.length > intValidationMaxLines) ?
						strErrorTextTooLong : strErrorTextPressEnter; 
						//'<%=getDict(objDict, "error_texttoolong")%>' :
						//<%=getDict(objDict, "error_pressenter")%>';
			}
		}
		
		return lResult;	
	}
	
	function convertToUpper(obj) {
		if (strOldText=='') { strOldText=obj.value }
		obj.value = obj.value.toUpperCase();
		document.construct.btnreset.disabled=false;	// store old txt in var, enable reset-button
	}
	
	function convertToLower(obj) {
		if (strOldText=='') { strOldText=obj.value }
		obj.value = obj.value.toLowerCase();
		document.construct.btnreset.disabled=false;	// store old txt in var, enable reset-button
	}
	
	function convertUndo(obj) {
		if (strOldText!='') {
			obj.value=strOldText;
			strOldText='';
			document.construct.btnreset.disabled=true;
			}
		}
	
	function convertTitleCase(obj) {
		var index;
		var tmpStr;
		var tmpChar;
		var preString;
		var postString;
		var strlen;
		
		if (strOldText=='') { strOldText=obj.value }
		tmpStr = obj.value.toLowerCase();
		strLen = tmpStr.length;
		if (strLen > 0)  {
			for (index = 0; index < strLen; index++)  {
				if (index == 0)  {
					tmpChar = tmpStr.substring(0,1).toUpperCase();
					postString = tmpStr.substring(1,strLen);
					tmpStr = tmpChar + postString;
				}
			else {
				tmpChar = tmpStr.substring(index, index+1);
				if ((tmpChar == " " || tmpChar == "\n") && index < (strLen-1))  {
					tmpChar = tmpStr.substring(index+1, index+2).toUpperCase();
					preString = tmpStr.substring(0, index+1);
					postString = tmpStr.substring(index+2,strLen);
					tmpStr = preString + tmpChar + postString;
		         }
		      }
		   }
		}
		obj.value = tmpStr;
	}

	
	

	

		var itextDivOpen = null;

		function WWPopUp(strURL) {
			var win=window.open('' + strURL + '','Telegram.nl','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=800,height=600,top=100,left=100');
		}

		HM_DOM = document.getElementById ? true : false;
		HM_IE  = document.all ? true : false;
		HM_NS4 = document.layers ? true : false;
		
		function toggleSelect(boolShow) {
			if (!(HM_DOM||HM_IE||HM_NS4)) return true;
			if (HM_NS4) return true;
			
			var ElementsToToggle = [];
			
			ElementsToToggle = (HM_DOM) ? document.getElementsByTagName('select') : document.all.tags('select');
			
			for(var j=0; j < ElementsToToggle.length; j++) {
				var theElement = ElementsToToggle[j];
				
				if (!theElement) continue;
				
				if (HM_DOM||HM_IE) {
					theElement.style.visibility = boolShow ? "inherit" : "hidden";
				} else if (HM_NS4) {
					theElement.visibility = boolShow ? "inherit" : "hide";
				}
			}
			
			return true;
		}


		var itextTimer = null;
		
		function clearIText() {
			clearTimeout(itextTimer);
			itextTimer = null;
			
			if (itextDivOpen)
				itextDivOpen.style.display = 'none';
				
			toggleSelect(true);
		}
		
		function doITextAction(uniqueID, strStyle) {
			clearTimeout(itextTimer);
			itextTimer = null;
			
			var obj = document.getElementById(uniqueID);
			var objOrigin = document.getElementById(uniqueID + '_Origin');
			
			if (itextDivOpen && (itextDivOpen != obj)) { 
				itextDivOpen.style.display = 'none'; 
			}
			itextDivOpen = obj;

			if (strStyle == 'toggle') {
				if (obj.style.display != '') {
					obj.style.display = ''; 
				} else {
					itextTimer = setTimeout(clearIText, 50);
				}
			} else if (strStyle == 'none') {
				itextTimer = setTimeout(clearIText, 1000);
			} else {
				obj.style.display = strStyle; 
			}
			
			if (obj.style.display == '') {	
				if (obj.offsetHeight > itextHeight) { obj.style.height = itextHeight; } else {obj.style.height = obj.offsetHeight;}
				var intX = objOrigin.offsetLeft - 50;
				var intY = objOrigin.offsetTop;
				var intHeight = parseInt(obj.style.height);
				obj.style.left = getValidX(intX, itextWidth);
				obj.style.top = getValidY(intY,intHeight);
				toggleSelect(false);
			} else {
				toggleSelect(true);
			}
		}

		function doRollOver() {
			document.getElementById('menuBar').style.height="500px";
		}
		function doRollOut() {
			document.getElementById('menuBar').style.height="35px";
		}
		function getFlashMovieObject(movieName)
		{
		  if (window.document[movieName]) 
		  {
		      return window.document[movieName];
		  }
		  if (navigator.appName.indexOf("Microsoft Internet")==-1)
		  {
		    if (document.embeds && document.embeds[movieName])
		      return document.embeds[movieName]; 
		  }
		  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
		  {
		    return document.getElementById(movieName);
		  }
		}
		function RewindFlashMovie1()
		{
			var flashMovie=getFlashMovieObject("inland");
			flashMovie.Rewind();
		}
		function PlayFlashMovie1()
		{
			var flashMovie=getFlashMovieObject("inland");
			flashMovie.Play();
			//embed.nativeProperty.anotherNativeMethod();
		}
		function RewindFlashMovie2()
		{
			var flashMovie=getFlashMovieObject("gelegenheden");
			flashMovie.Rewind();
		}
		function PlayFlashMovie2()
		{
			var flashMovie=getFlashMovieObject("gelegenheden");
			flashMovie.Play();
			//embed.nativeProperty.anotherNativeMethod();
		}
		
		
		// valid postitioning of popup-divs
		
		function getWindowWidth() {
		  var myWidth = 0;
		  if( typeof( window.innerWidth ) == 'number' ) {
		    //Non-IE
		    myWidth = window.innerWidth;
		  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		    //IE 6+ in 'standards compliant mode'
		    myWidth = document.documentElement.clientWidth;
		  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		    //IE 4 compatible
		    myWidth = document.body.clientWidth;
		  }
		  return myWidth;
		}
		
		function getWindowHeight() {
		  var myHeight = 0;
		  if( typeof( window.innerWidth ) == 'number' ) {
		    //Non-IE
		    myHeight = window.innerHeight;
		  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		    //IE 6+ in 'standards compliant mode'
		    myHeight = document.documentElement.clientHeight;
		  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		    //IE 4 compatible
		    myHeight = document.body.clientHeight;
		  }
		  return myHeight;
		}
		
		function getScrollX() {
		  var scrOfX = 0;
		  if( typeof( window.pageYOffset ) == 'number' ) {
		    //Netscape compliant
		    scrOfX = window.pageXOffset;
		  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
		    //DOM compliant
		    scrOfX = document.body.scrollLeft;
		  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
		    //IE6 standards compliant mode
		    scrOfX = document.documentElement.scrollLeft;
		  }
		  return scrOfX;
		}
		
		function getScrollY() {
		  var scrOfY = 0;
		  if( typeof( window.pageYOffset ) == 'number' ) {
		    //Netscape compliant
		    scrOfY = window.pageYOffset;
		  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
		    //DOM compliant
		    scrOfY = document.body.scrollTop;
		  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
		    //IE6 standards compliant mode
		    scrOfY = document.documentElement.scrollTop;
		  }
		  return scrOfY;
		}

		function getValidX(intX,intWidth) {
			var intValidX = 0;
			var intClientWidth = getWindowWidth();
			if (intX >= 0) {
				if ((intX + intWidth) <= intClientWidth) {
					intValidX = intX;
					}
				else {
					intValidX =  intClientWidth - intWidth;
				}
			}
			return intValidX;
		}
		
		function getValidY(intY,intHeight) {
			var intValidY = 0;
			var intClientHeight = getWindowHeight();
			var intClientTop = getScrollY();
			if (intY >= 0) {
				if ((intY + intHeight) <= (intClientTop + intClientHeight)) {
					intValidY = intY;
					}
				else {
					intValidY = (intClientTop + intClientHeight) - intHeight;
				}
			}
			return intValidY;
		}
	
	
function popUp(URL) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=660,height=500,left = 340,top = 262');");
}

function rot13(input) {
	var coding = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMabcdefghijklmnopqrstuvwxyzabcdefghijklm';
	
	for (var text = '',i=0;i<input.length;i++) {
		character = input.charAt(i);
		position = coding.indexOf(character);
		if (position > -1) {
			character = coding.charAt(position + 13);
		}
		text += character;
	}
	
	return text;
}

function ontRot(linkje) {
	if (linkje.href.indexOf('mailto:')!=0) {
		linkje.href=rot13(linkje.href);
	}
}
	
	