<!--
///////////////////////////////////////////////////////////////////////////
//     This script was designed by plx Web Studio  //
//                                                                                             //
//     For more info: http://plxwebdev.com                  //
//     Contact Email: admin@plxwebdev.com          //
/////////////////////////////////////////////////////////////////////////

		
		var desitnayionurl = '../us/popup/popup.html'; //the page loaded in the popup window or in the floating layer
		var uselayer = 1; // 0=no; 1=yes
		var usefarewellpop = 0; // 0=no; 1=yes
		var usewelcomepop = 1; // 0=no; 1=yes

		var usepopunder = 0; // 0=no; 1=yes
		var popunder_timed = 0; // timed popunder in seconds; use 0 to pop on load
		// Specify the width and height of new popunder window (in pixels).
		var popunder_width = '500'; 
		var popunder_height = '500';
		// set any of these appearance settings as you wish
		var popunder_props = 'scrollbars=yes,resizable=yes,toolbar=yes,' + 
		'menubar=yes,status=yes,location=yes,left=85,top=20,height=' +  
		popunder_height + ',width=' + popunder_width;

		var usepopup = 0; // 0=no; 1=yes
		var popup_one_time = 1; // Load new PopUnder only once per browser session? (0=no, 1=yes); 
		var popup_timed = 1; // timed popunder in seconds; use 0 to pop on load
		// Specify the width and height of new popup window (in pixels).
		var popup_width = '200'; 
		var popup_height = '200';
		// set any of these appearance settings as you wish
		var popup_props = 'scrollbars=no,resizable=no,toolbar=no,' + 
		'menubar=no,status=no,location=yes,left=85,top=20,height=' +  
		popup_height + ',width=' + popup_width;
		
		// general functions
		isIE = document.all;
		isNN =! document.all && document.getElementById;
		isN4 = document.layers;
		isHot = false;

	
		// making popunder
		function load_pop_under(){
			if (!usepopunder) return;
			win2 = window.open(desitnayionurl, "popunder", popunder_props);
			win2.blur();
			window.focus();
		}
		function GoLoadPopUnder() {
			load_pop_under();
			if (popunder_timed) clearTimeout(popundertimer);
		}



		// making popup
		function load_pop_up(){
			if (!usepopup) return;
			window.open(desitnayionurl, "popup", popup_props);
		}
		function GoLoadPopUp() {
			load_pop_up();
			if (popup_timed) clearTimeout(popuptimer);
		}


		function GeneralLoader(wentunload) {
			if (wentunload && !usefarewellpop) return;
			if (!wentunload && !usewelcomepop) return;
			if (wentunload && usefarewellpop) {
				GoLoadPopUnder();
				GoLoadPopUp();
				return;
			}
			if (popunder_timed) popundertimer = setTimeout("GoLoadPopUnder()", 1000*popunder_timed);
			else GoLoadPopUnder();
			if (popup_timed) popuptimer = setTimeout("GoLoadPopUp()", 1000*popup_timed);
			else GoLoadPopUp();
			if (uselayer) showMe();
			else hideMe();
		}


	function ddInit(e){
		topDog = isIE?"BODY":"HTML";
		whichDog = isIE?document.all.theLayer : document.getElementById("theLayer");  
		hotDog=isIE ? event.srcElement : e.target;  
		while (hotDog.id!="titleBar"&&hotDog.tagName!=topDog){
			hotDog=isIE ? hotDog.parentElement : hotDog.parentNode;
		}  
		if (hotDog.id=="titleBar"){
			offsetx=isIE ? event.clientX : e.clientX;
			offsety=isIE ? event.clientY : e.clientY;
			nowX=parseInt(whichDog.style.left);
			nowY=parseInt(whichDog.style.top);
			ddEnabled=true;
			document.onmousemove=dd;
		}
	}

	function dd(e){
		if (!ddEnabled) return;
		whichDog.style.left=isIE ? nowX+event.clientX-offsetx : nowX+e.clientX-offsetx; 
		whichDog.style.top=isIE ? nowY+event.clientY-offsety : nowY+e.clientY-offsety;
		return false;  
	}

	function ddN4(whatDog){
		if (!isN4) return;
		N4=eval(whatDog);
		N4.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
		N4.onmousedown = function(e) {
			N4.captureEvents(Event.MOUSEMOVE);
			N4x=e.x;
			N4y=e.y;
		}
		N4.onmousemove = function(e){
			if (isHot){
				N4.moveBy(e.x-N4x,e.y-N4y);
				return false;
			}
		}
		N4.onmouseup=function(){
			N4.releaseEvents(Event.MOUSEMOVE);
		}
	}

	function hideMe(){
		whichDog = isIE?document.all.theLayer : document.getElementById("theLayer");  
		if (isIE||isNN) whichDog.style.visibility="hidden";
		else if (isN4) document.theLayer.visibility="hide";
	}

	function showMe(){
		whichDog = isIE?document.all.theLayer : document.getElementById("theLayer");  
		if (isIE||isNN) whichDog.style.visibility="visible";
		else if (isN4) document.theLayer.visibility="show";
	}
	document.onmousedown = ddInit;
	document.onmouseup = Function("ddEnabled=false");

 -->