var strDomain=".interestfree.com.au";if(typeof(strGEMID1)!="undefined"&&strGEMID1!=""){writeCookie("Src_GEMID1",30,strGEMID1)}else{writeCookie("Src_GEMID1",30,getURLParam("gemid1"))}if(typeof(strGEMID2)!="undefined"&&strGEMID2!=""){writeCookie("Src_GEMID2",0,strGEMID2)}else{writeCookie("Src_GEMID2",0,getURLParam("gemid2"))}if(typeof(strOFFER)!="undefined"&&strOFFER!=""){writeCookie("Src_OFFER",0,strOFFER)}else{writeCookie("Src_OFFER",0,getURLParam("offer"))}function getURLParam(strParamName){var strReturn="";var strHref=window.location.href.toLowerCase();if(strHref.indexOf("?")>-1){var strQueryString=strHref.substr(strHref.indexOf("?"));var aQueryString=strQueryString.split("&");for(var iParam=0;iParam<aQueryString.length;iParam++){if(aQueryString[iParam].indexOf(strParamName+"=")>-1){var aParam=aQueryString[iParam].split("=");strReturn=aParam[1];break}}}return strReturn}function writeCookie(strName,strExpiry,strValue){if(strValue!=""){if(strExpiry>0){var expdate=new Date();expdate.setDate(expdate.getDate()+strExpiry);document.cookie=strName+"="+escape(strValue)+";expires="+expdate.toGMTString()+";path=/ ;domain="+strDomain}else{document.cookie=strName+"="+escape(strValue)+";path=/ ;domain="+strDomain}}};