
<!--

	/*--------------------------------------------------
	 * ( String url, String target )
	 *
	 *   date: Oct 11 2005
	 *   author: Arkadiusz Gruszowski
	 */
	function simpleWindow(url, name, width, height) {
	
		var win = window.open(url, name, 'height=' + height + ', width=' + width + ', toolbar=yes, directories=yes, status=yes, menubar=yes, scrollbars=yes, resizable=yes');
		
		if( win == null) {
			alert("Error:: Cannot open new window. Unfortunately this site requires popup windows, please turn off any popup blocking software.");	
		} else
			return false;
	}

	/*--------------------------------------------------
	 * setFocus( [Object o] )
	 *   Sets the focus on the specified object, by 
	 *   default the first element of the form on
	 *   the page is selected. Ignores hidden fields.
	 *
	 *   date: Oct 11 2005
	 *   author: Arkadiusz Gruszowski
	 */
	function setFocus( o ) {
		
		if( o != undefined ) 								// If object has been specified.
			try { 											// Try the function in case object cannot be focused
				o.focus();
				o.select();
			} catch(e) {}
		 else if( document.forms.length > 0) 				// If at least 1 form is present.
			var l = document.forms[0].elements.length; 		// Store length for faster loop execution.
			for(var i=0; i < l; i++) {
				var element = document.forms[0].elements[i];
				if( element.type != "hidden" ) {			// If the element is hidden ignore.
						element.focus();
						element.select();
						break;								// Break if first focusable field is found.
				}
			}
	}
	
	
	// Fixes IE Bug for always placing select boxes on top layer.
	
	function hideSelect() {
		var objs = document.getElementsByTagName("select");
		var l = objs.length;
		
		for(var i=0; i < l; i++) {
			(objs[i]).style.visibility = "hidden";
		}
	}
	
	function showSelect() {
		var objs = document.getElementsByTagName("select");
		var l = objs.length;
		
		for(var i=0; i < l; i++) {
			(objs[i]).style.visibility = "visible";
		}
	}
	
	// ----- Country Code Picker ----------------------------
	
	var hidden = true;
	
	function show() {
		var o = document.getElementById("countryList");
		
		if( hidden ) {
			o.style.display = "block";
			hideSelect();
		} else {
			o.style.display = "none";
			showSelect();
		}
		hidden = !hidden;
	}
	
	function on( element ) {
		element.style.background = "#EDE7F1";
		element.style.color = "#FFF";
	}
	
	function of( element ) {
		element.style.background = "#FFF";
		element.style.color = "#000";
	}
	
	function assign( countryCode ) {
		var o = document.getElementById("popUpCountryCode");
		
		var l = countryCode.childNodes.length;
		for( var i=0; i < l; i++ )
			if( countryCode.childNodes[i].tagName == "TH" ) {
				o.value = countryCode.childNodes[i].innerHTML;
				break;	
			}
		
		of( countryCode );
		show();
	}

-->
