function setValue(itemid, value) {
	getElement(itemid).value = value;
}

function openCleanWindow(theHref, windowName) {
	window.open(theHref, windowName, 'scrollbars=yes,resizable=yes,height=560,width=720,toolbar=no,menubar=no');
}

function getValue(itemid) {
	return getElement(itemid).value;
}

function getParentValue(itemid) {
	return getWindowElement(window.opener, itemid).value;
}

function setInnerHTML(itemid, value) {
	getElement(itemid).innerHTML = value;
}

function getElement(itemid) {
	var theElement;
	if (document.all) {
		eval("theElement = document.all."+itemid);
	}
	else {
		if (navigator.userAgent.indexOf("Gecko")!=-1) {// is NS6 ?
			theElement = document.getElementById(itemid);
		}
		else {
			eval("theElement = document.layers['"+itemid+"']");
		}
	}
	return theElement;
}

function getWindowElement(thewin, itemid) {
	var theElement;
	if (document.all) {
		eval("theElement = thewin.document.all."+itemid);
	}
	else {
		if (navigator.userAgent.indexOf("Gecko")!=-1) {// is NS6 ?
			theElement = thewin.document.getElementById(itemid);
		}
		else {
			eval("theElement = thewin.document.layers['"+itemid+"']");
		}
	}
	return theElement;
}

function positionOnParent() {
	if (document.all) {
		window.moveTo(window.opener.screenLeft+20, window.opener.screenTop-20);
	}
	else {
		if (navigator.userAgent.indexOf("Gecko")!=-1) {// is NS6 ?
			window.moveTo(window.opener.screenX+20, window.opener.screenY+20);
		}
		else {
			window.moveTo(window.opener.screenLeft+20, window.opener.screenTop);
		}
	}
}