fullurl = window.location.search.substring(1);
splitquery = fullurl.split("&");
for (i=0;i<splitquery.length;i++)
{
	qsFullValue = splitquery[i].split("=");
	qsVariable=qsFullValue[0];
	qsValue=qsFullValue[1];
	if (qsVariable=="referral_code")
	{
	//set the referral_code value to Cookie
	var exdate=new Date();
	exdate.setDate(exdate.getDate()+60);
	document.cookie=qsVariable+ "=" +qsValue+";expires="+exdate.toUTCString();
	}
}
