function terms(name) {
var x1 =  (screen.width  - 620)/2;
var y1 =  (screen.height - 600)/2;
myRemote = open(name,'',"screenX="+ x1 + ",screenY=" + y1 + ",left="+ x1 + ",top="+ y1 + ",height=600,width=620,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=1,status=0,toolbar=0");
}

function terms_ritual(name) {
var x1 =  (screen.width  - 670)/2;
var y1 =  (screen.height - 643)/2;
myRemote = open(name,'',"screenX="+ x1 + ",screenY=" + y1 + ",left="+ x1 + ",top="+ y1 + ",height=643,width=670,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=1,status=0,toolbar=0");
}

function rubig(name) {
myRemote = open(name,'',"height=360,width=420,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0");
}

function dcost(name, length) {
	if (typeof (length) == 'undefined') length = 'height=490,width=480';
	myRemote = open(name,'', length + ",channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0");
}

function chsearch() {	
	kwd=new String();
	kwd=document.form1.keywords.value;
	if (kwd=="") { 
		return(false); 
	} else {
		return(true);
	}
}
	function IsSearch2 (obj) {
		var res = true;
		/*$('AddArticle_choices').getElementsBySelector('[class="selected"]').each (function (v) {
			v.getElementsBySelector('[class="article"]').each (function (v) {
				window.location = '/'+v.innerHTML+'.html';
				res = false;
			}
			)
		})*/		
		var article =  $("ul li.selected span.article").text();
		if ( article != '' ){
			window.location = '/'+article+'.html';
			res = false;
		}
		return res;
	}

function IsSearch (objFrm) {
	var result =	
		(document.forms[objFrm.name].search.value != 'Âàø çàïðîñ') 
		&& (document.forms[objFrm.name].search.value != 'Ïîèñê') 
		&& (document.forms[objFrm.name].search.value.toUpperCase () != 'ÏÎÈÑÊ ÏÎ ÊÀÒÀËÎÃÓ')
		&& (document.forms[objFrm.name].search.value != 'ïîèñê')
		&& (new String (document.forms[objFrm.name].search.value).replace(/^\s+|\s+$/, '').length > 0);
		return result
}
function IsLogin (objFrm) {
	var result =	
		(document.forms[objFrm.name].email.value != 'e-mail')
		&& (new String (document.forms[objFrm.name].email.value).replace(/^\s+|\s+$/, '').length > 0);
		return result
}

function launch(name) {
		p_GoodsExpanded (name, 593, 537);
}
function launch8(name){p_GoodsExpanded(name,593,507);}


function p_GoodsEventBase (name, event) {
	if (event.ctrlKey && event.altKey) {
		var name1="/very_"+name.substring(1, name.length);
		p_GoodsExpanded (name1, 743, 710);
	} else {
		p_GoodsExpanded (name, 750, 663);
	}
}

function p_GoodsEvent (name, event) {
	if (event.ctrlKey && event.altKey) {
		var name1="/very_"+name.substring(1, name.length);
		p_GoodsExpanded (name1, 743, 710);
	} else {
		p_GoodsExpanded (name, 593, 517);
	}
}

function p_Goods (name) { p_GoodsExpanded (name, 652, 585);}
function p_GoodsAdm (name) { p_GoodsExpanded (name, 750, 663);}
function p_GoodsBase (name) { p_GoodsExpanded (name, 750, 663);}
function p_Goods8marta (name) { p_GoodsExpanded (name, 652, 585);}
function p_GoodsWeeddig (name) { p_GoodsExpanded (name, 750, 663);}
function p_Mobile (name) { p_GoodsExpanded (name, 485,255);}

function p_Discount (name) { p_GoodsExpanded (name, 652,480);}
function p_DiscountRit (name) { p_GoodsExpanded (name, 593,460);}
function p_DiscountNy (name) { p_GoodsExpanded (name, 593,380);}

function p_Passwd (name) { popupWin=window.open(name, 'popup', 'height=190,width=240,top=0,scrollbars=no,resizable=no'); popupWin.focus();}
function p_Cards (name) { p_GoodsExpanded (name, 400, 620);}
function p_CardsWedding (name) { p_GoodsExpanded (name, 300, 620);}
function p_CardsMemo (name) { dcost(name, 'height=370,width=480');}
function p_GoodsNY (name) { p_GoodsExpanded (name, 593, 517);}


function p_GoodsExpanded (name, width, height) {
var x1 =  (screen.width  - width)/2;
var y1 =  (screen.height - height)/2;
myRemote = open(name, "propop", "screenX="+ x1 + ",screenY=" + y1 + ",left="+ x1 + ",top="+ y1 + ", width="+width+",height="+height+",channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0");
}
function p_GoodsExpandedScrl (name, width, height) {
var x1 =  (screen.width  - width)/2;
var y1 =  (screen.height - height)/2;
myRemote = open(name, "propop2", "screenX="+ x1 + ",screenY=" + y1 + ",left="+ x1 + ",top="+ y1 + ", width="+width+",height="+height+",channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=yes,status=0,toolbar=0");
}
function p_Agree () {
	popupWin=window.open("/agreements.html", "popup", "width=665,height=640,top=0,scrollbars=1");
	 popupWin.focus();
}
function p_Delivery () {
	popupWin=window.open("/usr-delivery/", "popup", "width=665,height=640,top=0,scrollbars=1");
	 popupWin.focus();
}

