	/* ==================================== */
	/* Core Metric and JSF Work around		*/
	/* ==================================== */
	
	function coremetricsJSFix(formNames) {
         var allLinksOnPage = document.getElementsByTagName ('a');

         for (var i=0; i < allLinksOnPage.length; i++)
         {
             // Checking if the current link belongs to the form
             for (var j=0; j < formNames.length; j++) {
             	if ((allLinksOnPage[i].id.indexOf (formNames[j]) != 1))
            	 	allLinksOnPage[i].href = '';
            }
         }
     }

 	$(document).ready(function () {
 		$('#countryWarning').fadeIn(1000);
	});	
	
	var QLJS = new Object();
	/*
	 * This function allows you to store information in a cookie using JavaScript
	 */
	QLJS.setCookie = function(c_name, value, expireDays, domain) {
		var exdate = new Date();
		if (expireDays == null) {
			expireDays = 999;
		}
		exdate.setDate(exdate.getDate() + expireDays);
		var cookie = c_name + "=" + escape(value) + ";expires=" + exdate.toGMTString()+ ";path=/";
		if (domain != null) {
			cookie = cookie + ";domain=" + domain;
		}
		document.cookie = cookie;
	}

	/*
	 * This function allows you to retrieve information from a cookie using JavaScript
	 */
	QLJS.getCookie = function(c_name) {
		if (document.cookie.length > 0){
			var c_start = document.cookie.indexOf(c_name + "=");
			if (c_start!=-1) { 
				c_start = c_start + c_name.length + 1; 
				c_end = document.cookie.indexOf(";", c_start);
				if (c_end == -1) {
					c_end = document.cookie.length;
				}
				return unescape(document.cookie.substring(c_start, c_end));
			}
		}
		return "";
	}
	

