/* popup window */ 
var popupwin = document.getElementById("popup");
var allSelects = document.getElementsByTagName("select");
function examplePopup(val){
	popupwin.style.display = "block";
	var textCont = eval(val);
	//var textElm = document.createTextNode(textCont);
	var popinfo = document.getElementById("popupinfo");
	popinfo.innerHTML = textCont;
	/*if(popinfo.hasChildNodes()){
		popinfo.replaceChild(textCont,popinfo.firstChild);
	} else {
		popinfo.innerHTML = textCont;
	}*/
	for(var i=0;i<allSelects.length;i++){
		allSelects[i].style.display = "none";
	}
}
function closeExample(){
	popupwin.style.display = "none";
	for(var i=0;i<allSelects.length;i++){
		allSelects[i].style.display = "inline";
	}
}

/* popup window mover keep below fold */
if(document.getElementById){
	objtomove = document.getElementById("popup");
}

if(document.compatMode && document.compatMode != "BackCompat"){
	 thebody=document.documentElement;
}
else {
	thebody=document.body;
}

/* set position */
function positionit(){

	if(document.all){
		elemtop=thebody.scrollTop; 
	}
	else {
		elemtop=pageYOffset;
	}
	if (document.getElementById){
		objtomove.style.top=elemtop+50+"px";
	}
}
/* keep checking */
setInterval("positionit()",2)

