	
function show(link, w, h) {
	xx = window.open("","link","menubar=no, toolbar=no, location=no, directories=no, status=no, scrollbars=no, resizable=no, width= " + w + ", height=" + h);
	out = "<html><head><title>Просмотр</title></head><body style='margin: 0 0 0 0;'><table cellpadding=0 cellspacing=0><tr><td><a href='javascript:window.close();'><img src='" + link + "' border=0 alt='закрыть'></a></td></tr></table></body></html>";
	xx.document.write(out);
	xx.focus();
	}
	

function html(link, w, h) {
	newWindow = window.open(link, "link", "top=30, left=30, menubar=no, toolbar=no, location=no, directories=no, status=no, scrollbars=yes, resizable=no, width= " + w + ", height="+ h);
	newWindow.focus();
	}


	
	
	
function newW() {
	var newWindow = null  ;

	newWindow = window.open("","newW",'top=130, left=130, menubar=0, toolbar=1, location=1, directories=0, status=0, scrollbars=no, resizable=yes, width=400, height=200')
	document.form.target = "newW" ;
	
			
	if (!newWindow || newWindow.closed)
		newWindow = window.open("","newW","")
	else
		newWindow.focus()

	return;
	}

	
	
	
function check() {

	if ( document.form.name.value == "" && document.form.mail.value == "" && document.form.subject.value == "" && document.form.body.value == "") {
		alert("Ни одно поле не заполнено!\n");
		return false;
		}
		else { 
			newW(); 
			form.submit();
			}

}



function faq() {

	if ( document.faq.quest.value == "" && document.form.name.value == "") {
		alert("Ни одно поле не заполнено!\n");
		return false;
		}
		else { 
			newW(); 
			faq.submit();
			}

}
