	function ValidateExchangeForm(){
	
		if(document.forms["ExchangePosting"].elements[2].value.length == 0){
			alert("Вы не указали цену!");
		}
		else if (document.forms["ExchangePosting"].elements[4].value.length == 0){
			alert("Укажите название!");
		}
		else{
			var x,y;
			x=Math.floor((screen.width - 200)/2);
			y=Math.floor((screen.height - 150)/2);
			var msgWindow = window.open ("", "ExchangePosting", "height=150,width=200,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=no,left="+x+",top="+y,"replace=true");
			if (msgWindow != null && msgWindow.opener == null) msgWindow.opener=window;
			if (navigator.appVersion.charAt(0) == 4) {
				msgWindow.focus();
			}
			document.forms["ExchangePosting"].submit();
		}
	
	}
	
	function ExchangeFilter(){
			document.forms['Filter'].submit();
	}
	
	function ShowPhoto(img, width, height){
			var x,y;
			x=Math.floor((screen.width - width)/2);
			y=Math.floor((screen.height - height)/2);
			var msgWindow = window.open ("/images/exchange/"+img, "ExchangePhoto", "height="+height+",width="+width+",status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=no,left="+x+",top="+y,"replace=true");
			if (msgWindow != null && msgWindow.opener == null) msgWindow.opener=window;
			if (navigator.appVersion.charAt(0) == 4) {
				msgWindow.focus();
			}
	}

