function showLogin(){
	document.getElementById('login-form').style.display = 'block';
	return false;
	return true;
}

function hideLogin(){
	document.getElementById('login-form').style.display = 'none';
	return false;
}

function Flash () {
this._swf = '';
this._width = 0;
this._height = 0;
this._params = new Array();
}

Flash.prototype.setSWF = function (_swf, _width, _height) {
this._swf = _swf;
this._width = _width;
this._height = _height;
}

Flash.prototype.setParam = function (paramName, paramValue) {
this._params[this._params.length] = paramName+'|||'+paramValue;
}

Flash.prototype.display = function () {
var _txt = '';
var params = '';
var _param = '';
var i = 0;

_txt += '<object>\n';
_txt += '<param width="'+this._width+'" height="'+this._height+'" name="movie" value="'+this._swf+'" />\n'
_txt += '<param name="quality" value="high" />\n';
for ( i=0;i<this._params.length;i++ ) {
_param = this._params[i].split ('|||');
_txt += '\t<param name="'+_param[0]+'" value="'+_param[1]+'" />\n';
params += _param[0]+'="'+_param[1]+'" ';
}

_txt += '<embed width="'+this._width+'" height="'+this._height+'" src="'+this._swf+'" '+params+' quality="high" type="application/x-shockwave-flash"></embed>\n';
_txt += '</object>\n';
document.write (_txt);
}


function CheckForm(formName){

	if (document.getElementsByName('name')[0].value=='')
	{
		alert('Введите ваше имя');
		return false;
	}

	if (document.getElementsByName('mail')[0].value=='')
	{
		alert('Введите ваш email');
		return false;
	}
	
	if(!isValidEmail(document.getElementsByName('mail')[0].value,true)){
		alert('Не корректный email');
		return false;	
		
	}

	if (document.getElementsByName('question')[0].value=='')
	{
		alert('Введите ваш вопрос');
		return false;
	}

	return true;
}

/*
    function isValidEmail(email)
        {
             re = /^([a-z0-9_\-]+\.)*[a-z0-9_\-]+@([a-z0-9][a-z0-9\-]*[a-z0-9]\.)+[a-z]{2,4}$/i;
             return re.test(email);
        }
        */

function isValidEmail (email, strict)
{
 if ( !strict ) email = email.replace(/^\s+|\s+$/g, '');
 return (/^([a-z0-9_\-]+\.)*[a-z0-9_\-]+@([a-z0-9][a-z0-9\-]*[a-z0-9]\.)+[a-z]{2,4}$/i).test(email);
}


function checkFormOrder()
{
	if ( (document.getElementsByName('name')[0].value=='') || (document.getElementsByName('phone')[0].value=='') )
	{
		alert('Вы должны указать свое имя и телефон');
		return false;
	}else return true;
}











function imgWin(img){
	var scr='/js/img.htm';
	var wn=window.open(scr+'?'+escape(img),'win','resizable,width=400,height=200,screenX=0,screenY=0,top=0,left=0')
	wn.focus()
	return false;
}