
	function popupWindow(url,w,h) {

		windowprops = "height="+h+",width="+w+",location=no,scrollbars=no,menubar=no,toolbar=no,resizable=no,titlebar=no,status=no"
		window.open(url, "Picture" + w + h, windowprops);
	}
	
	function popupScrolerWindow(url,w,h) {
		windowprops = "height="+h+",width="+w+",location=no,scrollbars=yes,menubar=no,toolbar=no,resizable=yes,titlebar=no,status=no";
	 	window.open(url, "Picture" + w + h, windowprops);
	}

		
	function popupSurvey(form,operate) {

		optionid=0
		h=350
		w=450
		windowprops = "height="+h+",width="+w+",location=no,scrollbars=no,menubar=no,toolbar=no,resizable=no,titlebar=no,status=no"
		
	    for (i=0; i<form.answerid.length; i++) {
			if (form.answerid[i].checked) {
				optionid = form.answerid[i].value
			}
		}		
		if (operate==2) optionid=0
		window.open(form.action + "?surveyid=" + form.surveyid.value + "&optionid=" + optionid + "&operate=" + operate, "Anketa", windowprops);
	}




	function resizetext(action) 			
	{
		if (action == 1) {	
			if (document.getElementById("bodytext").style.fontSize == '13px') 
				{ document.getElementById("bodytext").style.fontSize = 11; }
			if (document.getElementById("bodytext").style.fontSize == '16px') 
				{ document.getElementById("bodytext").style.fontSize = 13; }
			if (document.getElementById("bodytext").style.fontSize == '20px') 
				{ document.getElementById("bodytext").style.fontSize = 16; }					
		} else {
			if (document.getElementById("bodytext").style.fontSize == '16px') 
				{ document.getElementById("bodytext").style.fontSize = 20; }
			if (document.getElementById("bodytext").style.fontSize == '13px') 
				{ document.getElementById("bodytext").style.fontSize = 16; }
			if (document.getElementById("bodytext").style.fontSize == '11px') 
				{ document.getElementById("bodytext").style.fontSize = 13; }
		}
	}			

	
function check_number(e)
	{
		var ns = (navigator.appName == "Netscape");

		if(ns) var key_index = e.which;
		else var key_index = window.event.keyCode;

		// status = 'key pressed = '+key_index;
		// only allow numbers and backspace
		if(key_index>47 && key_index<58 )
		return true;
		else
		return false;
	}	
	
function replaceImage(mainimage,sourceimage,src) 
	{
		document.images[document.images[mainimage].orgsrc].src = document.images[document.images[mainimage].orgsrc].orgsrc;
		document.images[mainimage].src = src;
		document.images[sourceimage].src = 'images/transparent.gif';
		document.images[mainimage].orgsrc = sourceimage
		
	}	

function imgErrorFunc(jdocid) 
	{   
		jdocid.src = 'images/transparent.gif';
	}	