function get_object(o) {
	if (document.all)
		return document.all[o];
	else if (document.getElementById)
		return document.getElementById(o);
}
function idExist(theID) {
	if (document.all) {
		if (document.all[theID])
			return true;
		else
			return false;
	} else if (document.getElementById) {
		if (document.getElementById(theID))
			return true;
		else
			return false;
	} else {
		return false;
	}
}
function isInt(theValue) {
	if (isNaN(theValue) || theValue.indexOf(',') > 0 || theValue.indexOf('.') > 0)
		return false;
	else
		return true;
}
function replaceBadMSWordCharacter(theField) {
	theField.value=theField.value.replace(/\u201A/g,"'");//baseline single quote
	theField.value=theField.value.replace(/\u0192/g,'<i>f</i>');//florin (small letter f with hook)
	theField.value=theField.value.replace(/\u201E/g,'"');//baseline double quote
	theField.value=theField.value.replace(/\u2026/g,'...');//ellipsis (3 horisontal ellipsis)
	theField.value=theField.value.replace(/\u2020/g,'&sup1');//dagger (cross)
	theField.value=theField.value.replace(/\u2021/g,'&sup2');//double dagger (cross with two horisontal lines)
	theField.value=theField.value.replace(/\u02C6/g,'^');//circumflex accent
	theField.value=theField.value.replace(/\u2030/g,'o/oo');//permile (as procent sign, but with double zeros)
	theField.value=theField.value.replace(/\u0160/g,'Sh');//S Hacek
	theField.value=theField.value.replace(/\u2039/g,'"');//left single guillemet (single left-pointing angle quotation mark)
	theField.value=theField.value.replace(/\u0152/g,'OE');//OE ligature
	theField.value=theField.value.replace(/\u2018/g,"'");//left single quote
	theField.value=theField.value.replace(/\u2019/g,"'");//right single quote
	theField.value=theField.value.replace(/\u201C/g,'"');//left double quotation mark
	theField.value=theField.value.replace(/\u201D/g,'"');//right double quotation mark
	theField.value=theField.value.replace(/\u2022/g,"*");//bullet
	theField.value=theField.value.replace(/\u2013/g,"-");//endash
	theField.value=theField.value.replace(/\u2014/g,"--");//emdash
	theField.value=theField.value.replace(/\u02DC/g,'~');//tilde accent
	theField.value=theField.value.replace(/\u2122/g,'<sup>TM</sup>');//trademark ligature
	theField.value=theField.value.replace(/\u0161/g,'sh');//s Hacek
	theField.value=theField.value.replace(/\u203A/g,'"');//right single guillement  (single right-pointing angle quotation mark)
	theField.value=theField.value.replace(/\u0153/g,'oe');//oe ligature
	theField.value=theField.value.replace(/\u0178/g,'Y');//Y Dieresis
}
function KM_imgPop(theImage) {
	window.open('includes/km/imgPopup.cfm?theImg='+theImage,'displayWindow','menubar=no,scrollbars=no,status=no,width=300,height=300');
}
function emailValidation(theEmail) {
	var emailLength=theEmail.length;
	var indexOfAlpha=theEmail.indexOf('@');
	var lenBetweenAlphaAndNextDot=theEmail.indexOf('.',indexOfAlpha)-indexOfAlpha-1;
	var lenDomain=emailLength-theEmail.lastIndexOf('.')-1;
	if (emailLength < 8)//the email address lenght must be at least 8 characters (ab@cd.ef)
		return false;
	else if (indexOfAlpha < 2)//the @ can occur at index 2 as earliest, -1 is returned if it don't exist at all
		return false;
	else if (lenBetweenAlphaAndNextDot < 2)//the first . after @ must occur at least 2 indexes later
		return false;
	else if (lenDomain < 2)//the domain name must be at least 2 characters
		return false;
	else
		return true;
}
function handleEnter(e) {
	if (e.keyCode == 13)
		return true;
	else
		return false;
}




