	
	var temp; 
	function fullscreen (myfile, myname, width, height)
	{
		if((navigator.appName.indexOf("Explorer")!=-1)&&(parseInt(navigator.appVersion.substring(0,1))<4))
			{
	       params = "width=" + width + ",height=" + height + ",scrollbars=1,locationbar=0,menubar=0,resizeable=1,status=1,top=10,left=10";
	    	newwin = window.open( myfile , myname , params)	;
			}
		else
			{
				if(temp)
				{
					if(!temp.closed)
						{
						temp.close();temp="";
						}
				}
	    	params = "width=" + width + ",height=" + height + ",scrollbars=1,dependent=1,locationbar=0,menubar=0,resizeable=1,status=1,screenx=10,screeny=10,top=10,left=10";
	    	newwin = window.open(myfile , myname , params)	;
			temp = newwin;
			temp.name = "temp";
			newwin="";
			}
	}

	function radioValue(radioButton)
	{
	    for (x = 0; x < radioButton.length; x++)
	    {
	        if (radioButton[x].checked == true) return radioButton[x].value; 
	    } 
	    return null;
	}
	
	function replaceChars(text, out , add) {
		temp = "" + text; // temporary holder
		
		while (temp.indexOf(out)>-1) {
			pos = temp.indexOf(out);
			temp = "" + (temp.substring(0, pos) + add + temp.substring((pos + out.length), temp.length));	
		}
		return temp
	}
	
	function confirmLink(theLink, message)
	{
	    // Confirmation is not required in the configuration file
	    // or browser is Opera (crappy js implementation)
	    
	
	    var is_confirmed = confirm(message);
	    if (is_confirmed) {
	        theLink.href += '&is_js_confirmed=1';
	    }
	
	    return is_confirmed;
	} // end of the 'confirmLink()' function 



	function openWindow(url, windowName, width, height) 
	{
		var x, y, resizable, scrollbars;
	
		x = parseInt(screen.width / 2.0) - (width / 2.0);
		y = parseInt(screen.height / 2.0) - (height / 2.0);
	
		resizable = "yes";
		scrollbars = "yes";
		
		if (navigator.appName.indexOf("IE") && resizable != 'yes') {
            var features = "resizable:" + resizable 
                + ";scroll:"
                + scrollbars + ";status:yes;center:yes;help:no;dialogWidth:"
                + width + "px;dialogHeight:" + height + "px;";

			window.showModalDialog(url, window, features);
		} else {
			var win = window.open(url, windowName, "top=" + y + ",left=" + x + ",scrollbars=" + scrollbars + ",modal=yes,width=" + width + ",height=" + height + ",resizable=" + resizable);
			win.resizeTo(width, height);
			win.focus();
		}
	}

	function myois_enable_submit_button(submit_button, select_button) {
		if (document.getElementById(select_button).options[0].selected == true) {
			document.getElementById(submit_button).disabled = true;
		} else {
			document.getElementById(submit_button).disabled = false;
		}
	}
	
	function switch_button(id) {
		document.getElementById(id).checked = 1;
	}
	
	function show_item(checkid, nameid) {
		if (document.getElementById(checkid).checked == true) {
			document.getElementById(nameid).style.display = "";
		} else {
			document.getElementById(nameid).style.display = "none";
		}
	}
	
	function show_id(nameid, imgid) {
		if (document.getElementById(nameid).style.display == "none") {
 			 document.getElementById(nameid).style.display = "";
			 document.getElementById(imgid).src = "../images/map_minus.gif";
		}
		else {
			document.getElementById(nameid).style.display = "none";
			document.getElementById(imgid).src = "../images/map_plus.gif";
		}
	}
	
	function show_dir_id(nameid, imgid) {
		if (document.getElementById(nameid).style.display == "none") {
 			 document.getElementById(nameid).style.display = "";
			 document.getElementById(imgid).src = "../images/map_dir_minus.gif";
		}
		else {
			document.getElementById(nameid).style.display = "none";
			document.getElementById(imgid).src = "../images/map_dir_plus.gif";
		}
	}
	
	function go_to_surfer(type, select_name) {
    	newwin = window.open(
			"../user/show.php?type=" + type + "&node=I&lid=1&id="  + (document.all.item(select_name).value), 
			"surfer", 
			"width=820 , height=580,scrollbars=1,locationbar=1,menubar=1,resizeable=1,status=1,top=10,left=10")	;
	}
	
	function mOvr(src, cOver) {
	    src.style.cursor = 'hand';
	    src.style.background = cOver;
		src.style.color = '#FFFFFF';
	    window.status='';
	    }
		
	function mOut(src, cOut) {
	    src.style.cursor = 'default';
	    src.style.background = cOut;
	    window.status='';
	  }
	  
	function mClick(web) {
	  location.href = web;
	  }
