function include_dom(script_filename) {
    var html_doc = document.getElementsByTagName('head').item(0);
    var js = document.createElement('script');
    js.setAttribute('language', 'javascript');
    js.setAttribute('type', 'text/javascript');
    js.setAttribute('src', script_filename);
    html_doc.appendChild(js);
    return false;
}
function getDomainName() {
    var host = document.location.hostname;
    var parts = host.split('.');
    if (parts[parts.length - 2].length + parts[parts.length - 1].length <= 5) {
                return parts.slice(parts.length - 3).join('.');
    } else {
                return parts.slice(parts.length - 2).join('.');
    }
}

var proto = "http:";
if(window.top.location.protocol == "https:"){
	proto = "https:";
}
var domain = getDomainName();
if(domain == 'webex.com'){
	domain = 'www.webex.com';
}
var query = window.top.location.search;
if(query.indexOf('?') >= 0){
	var connector = "&";
}
else{
	var connector = "?";
}
var jsref = connector+"jsref="+document.referrer
var filename = proto+"//"+domain+"/javascript/cookieCode.php"+query+jsref;
include_dom(filename);