	function MakeWindow(url, w, h, scroll, windowname) {
		var windowprops = "height=" + h + ",width=" + w + ",left=50,top=50,status=yes,location=no,scrollbars=" + scroll + ",menubars=no,toolbars=auto,resizable=yes";
		popup = window.open(url,windowname,windowprops);
	}
	
	function GotoUrl(url, value) {
		url = url + value;
		document.location.href = url;
	}
	
	function CaptchaImg() {
		document.write('<div id=\"captchaimg\"></div>');
		DoAjax('captchaimg', '/global/captcha.php', '&q=showimg');
	}
	
	function DoAjax(field, url, params, method, loadclassname) {
		var http = false;
		if (window.XMLHttpRequest)
			http = new XMLHttpRequest();
		else if (window.ActiveXObject)
			http = new ActiveXObject("Microsoft.XMLHTTP");  
		
		if (!method || method.toLowerCase() == 'get') {
			var method = 'GET';
			url += '?' + params;
		}
		
		if (!params)
			params = '';
		
		window.status = 'Loading...';
		
		if (loadclassname) {
			document.getElementById(field).className = loadclassname;
			document.getElementById(field).innerHTML = '';
		}
		
		http.open(method, url);
		http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		http.setRequestHeader("Content-length", params.length);
		http.setRequestHeader("Connection", "close");
		
		http.onreadystatechange = function() {
			if(http.readyState == 4 && http.status == 200) {
				
				if (loadclassname)
					document.getElementById(field).className = '';
				
				window.status = '';
				document.getElementById(field).innerHTML = http.responseText;
			} 
			else {
				window.status = 'Error...';
			}
		}
		
		http.send(decodeURI(params));
	}
	
	var isMinNS4 = (navigator.appName.indexOf("Netscape") >= 0 && parseFloat(navigator.appVersion) >= 4) ? 1 : 0;
	var isMinNS6 = (isMinNS4 && navigator.userAgent.indexOf("Gecko")>=0) ? 1 : 0;
	var isMinIE4 = (document.all) ? 1 : 0;
	var isMinIE5 = (isMinIE4 && navigator.appVersion.indexOf("5.")) >= 0 ? 1 : 0;
	var isDOM = (document.getElementById) ? 1 : 0;
	
	function GetBrowser(name) {
		if (isDOM)
			return document.getElementById(name);
		if (isMinNS4)
			return findLayer(name, document);
		if (isMinIE4)
			return eval('document.all.' + name);
		
		return null;
	}
	
	function ShowMore(name) {
		var name = GetBrowser(name);
		
		if (name.style.display == 'none')
			name.style.display = '';
		else
			name.style.display = 'none';
	}
	
	function FormatPrice(input) {
		input = String(input).replace(/[^0-9,\.]/g,"");
		var centen = String(input).match(/[,\.][0-9]{1,2}$/);
		var euro = String(input).replace(centen, "");
		
		euro = String(euro).replace(/[,\.]/g,"");
		centen = String(centen).replace(/[,\.]/g,"");
		
		var output = "";
		for(var i=0; i < euro.length; i++) {
			output += euro.substr(i,1);
			if((euro.length-1-i)%3 == 0 && i != euro.length-1) output += ".";
		}
		
		if(!parseInt(output)) output = "0";
		if(parseInt(centen)) {
		while(String(centen).length < 2) centen += "0";
			output += "," + centen;
		}
		else {
			output += ",00";
		}
		
		return output;
	}

