
function display_site() {
	if (document.getElementById('l1image') != null) {
		//document.getElementById('l1image').innerHTML = document.getElementById('l1image_temp').innerHTML;
	}
	if (document.getElementById('div_indicators') != null) {
		document.getElementById('div_indicators').innerHTML = document.getElementById('div_indicators_temp').innerHTML;
	}
	if (document.getElementById('div_right_ad') != null) {
		document.getElementById('div_right_ad').innerHTML = document.getElementById('div_right_ad_temp').innerHTML;
	}

	var ad1 = document.getElementById('ad1');
	var ad1_temp = document.getElementById('ad1_temp');
	
	//var objBrowser=new browser_sniffer();
	var agt=navigator.userAgent.toLowerCase();
	var is_mac=(agt.indexOf("mac")!=-1);
	var is_ns=(agt.indexOf("netscape")!=-1);
	
	if ((ad1 != null) && (ad1_temp != null)) {
		if ((is_mac) || (is_ns))
		{	//display_macads();
			//adsswap();
			//t_text = ad1_temp.innerHTML.toString();
			//alert(t_text);
			//ad1.innerHTML = t_text;
		}
		else
		{	ad1.innerHTML = ad1_temp.innerHTML; }
	}
	
}
function getMGCookieVal (offset) {
        var endstr = document.cookie.indexOf (";", offset);
                if (endstr == -1)
        endstr = document.cookie.length;
        return unescape(document.cookie.substring(offset, endstr));
}




function GetMGCookie (name) {
        var arg = name + "=";
        var alen = arg.length;
        var clen = document.cookie.length;
        var i = 0;
				 while (i < clen) {
					var j = i + alen;
                if (document.cookie.substring(i, j) == arg)
                return getMGCookieVal (j);
					i = document.cookie.indexOf(" ", i) + 1;
               if (i == 0) break; 
        }

				return null;
}
function SetLinkValueFromCookie()
{ var cookieval = GetMGCookie('smimid');

	if (cookieval == null)
	{
		mgsigntext.innerHTML ='sign in';
	}
	else
	{
		mgsigntext.innerHTML ='sign out';
	}

	
	
}


function random_variable()
	{
		var ddndt = new Date();
		strVariable = Math.round(ddndt.getTimezoneOffset()/60) + 'DDS' + ddndt.getTime()+'-'+Math.random();
		return strVariable;
	}
	
function WriteAdTag(strAdCode,nPosition,strAdsize){
	var strTag,strAdDetail;
	var strRandomVariable;
	strRandomVariable = random_variable();
	strAdDetail =  strAdCode + '&position=' + nPosition + '&adsize=' + strAdsize + '&number='+ strRandomVariable 
	strTag = ('<' + 'SCRIPT LANGUAGE="JavaScript1.1" SRC="http://a.coza.com/js.ng/'+ strAdDetail +'"></' + 'script>');
	strTag += ('<NOSCRIPT><A HREF="http://a.coza.com/click.ng/' + strAdDetail + '">'); 
	strTag += ('<IMG SRC="http://a.coza.com/image.ng/' + strAdDetail + '"></A></NOSCRIPT>')
	
	document.write(strTag);
}

function track_location(src, dest, ispopup, isbank) 
	{
		if (dest=='') {return;}url = 'http://www.mweb.co.za/system/clstat.aspx?src=' + src + '&dest=' + escape(dest);if (ispopup){options = 'location=yes,resizable=yes,height=570,width=400,screeny=0,screenx=0,left=0,top=0,scrollbars=yes,toolbar=yes,menu=yes';if (isbank) {options += ',status=yes';}winpop = window.open(url,'',options);if (winpop.focus){setTimeout('winpop.focus();',250);}return;}else{window.location.href = url;return;}
	}
	function track_location_windowsize(src, dest, ispopup, isbank, windowwidth, windowheight)
	{
		if (dest==''){return;}url = 'http://www.mweb.co.za/system/clstat.aspx?src=' + src + '&dest=' + escape(dest);if (ispopup){options = 'location=no,height=' + windowheight + ',width=' + windowwidth + ',screeny=0,screenx=0,left=0,top=0,scrollbars=no,toolbar=no,menu=no,resizable=yes';if (isbank) {options += ',status=yes';}winpop = window.open(url,'',options);if (winpop.focus){setTimeout('winpop.focus();',250);}return;}else{window.location.href = url;return;}
	}


