/* images change */
function changeImages(){
	if(document.images){
		for(var i=0; i<changeImages.arguments.length; i+=2){
			document[changeImages.arguments[i]].src = eval(changeImages.arguments[i+1] + ".src");
		}
	}
}

function openWindow (src, width, height){
	str = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">\n' +
			'<html>\n' +
			'<meta http-equiv="Content-Type" content="text/html; charset=Windows-1251">\n' +
			'<head>\n' +
			'	<title>Фотография</title>\n' +
			'</head>\n' +
			'<body text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" marginheight="0" marginwidth="0">\n' +
			'<div><img src="/images/photooftop.gif" width="86" height="30" border="0"></div>' +
			'<div><a href="javascript:window.close()"><img src="' + src + '" border="0" alt="(нажмите для закрытия окна)"></a></div>' +
			'<table border="0" cellpadding="0" cellspacing="0" width="' + width + '"><tr><td align="right"><img src="/images/photoofbottom.gif" width="68" height="30" border="0"></td></tr></table>' +
			'</body>\n' +
			'</html>';
	newWindow = window.open("", "simpleWindow", "width=" + width + ",height=" + height + ",menubar=no,status=no,resizeable=no,toolbar=no,location=no");
	window.newWindow.document.open("text/html");
	window.newWindow.document.write(str);
	window.newWindow.document.close();
	window.newWindow.focus();
}

function isValidEMail(address){
	if (address.replace(/^([a-zA-Z0-9_\-]+(\.[a-zA-Z0-9_\-]+)*)@([a-zA-Z0-9\-]+\.)+([a-zA-Z]{2,})$/i, '').length){
		return false;
	}
	else {
		return true;
	}
}
