function getWidth() {

  var myWidth = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
  } else if( document.documentElement &&
      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
  }
  else {
    myWidth = 1024;
  }
  return myWidth
}

function getHeight() {

  var myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myHeight = window.innerHeight;
  } else if( document.documentElement &&
      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myHeight = document.body.clientHeight;
  }
  else {
    myHeight = 768;
  }
  return myHeight;
}

function getValue(offset) {
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1)	endstr = document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie(name) {
	var arg = name + "=";
	var arg_len = arg.length;
	var cookie_length = document.cookie.length;
	var i = 0;
	while (i<cookie_length) {
		var j= i + arg_len;
		if (document.cookie.substring(i,j) == arg) return getValue(j);
		i = document.cookie.indexOf(" ",i) + 1;
		if (i == 0) break;
	}
	return null;
}

function SetCookie(name,value,expires) {
	document.cookie = name + "=" + escape(value) + ";expires=" + expires.toGMTString();
}

function ProgressDestroy() {
	if (document.all){
		otp.className = 'hide';
	}
	else if (document.layers) {
		document.progress.visibility = false;
	}
}

function showOrHide2(value) {
	browserName=navigator.appName;
	browserVersion=navigator.appVersion;
	if ((browserName=="Netscape") ||  (browserName=="Microsoft Internet Explorer")) {
		if (browserName=="Netscape") version="NS";
		else version="IE";
	}
	else version="OTHER";
	if (value==0){
		if (document.layers)document.layers["otp"].visibility='hide';
		else document.all["otp"].style.visibility='hidden';
	}
	else if (value==1) {
		if ((version=="IE")  && (browserVersion.indexOf("MSN")==-1)){
			if (document.layers)document.layers["otp"].visibility='show';
			else document.all["otp"].style.visibility='visible';
		}
		else value=0
	}
}

function showEyeBlaster(flashurl,stampurl,cookiename,timeoutlength,width,height,positionleft,positiontop,cookiehours) {
	var expiration_date = new Date();
	var durationofcookie = expiration_date.getTime() + (cookiehours * 60 * 60 * 1000);
	expiration_date.setTime(durationofcookie);
	var ex_date = expiration_date;
	var already_seen = GetCookie(cookiename);
    if (navigator.appVersion.indexOf("MSIE") != -1 && navigator.appVersion.indexOf("4.0") != -1 && navigator.appVersion.indexOf("Windows") != -1) {
		if (navigator.appVersion.indexOf("MSN") != -1)  {
			positiontop = positiontop - 9
		}
		else {}
		if (already_seen != "true") {
            //alert("belum ada cookie");
			document.write("<div id=\"otp\" style=\"position: absolute; left: " + positionleft + "; top: " + positiontop + "; width: " + width + "; height: " + height + "\">");
			document.write("<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" WIDTH=\"" + width + "\" HEIGHT=\"" + height + "\" id=\"" + flashurl + "\" ALIGN=\"\">");
			document.write("<PARAM NAME=movie VALUE=\"" + flashurl + "\"><PARAM NAME=quality VALUE=high><PARAM NAME=wmode VALUE=transparent><PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src=\"" + flashurl + "\" quality=high bgcolor=#FFFFFF  WIDTH=\"" + width + "\" HEIGHT=\"" + height + "\" NAME=\"utusanonlineeyeblaster\" ALIGN=\"\" TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/go/getflashplayer\"></EMBED>");
			document.write("</OBJECT>");
			document.write("</div>");
			SetCookie(cookiename,"true",ex_date);
			setTimeout("showOrHide2(0) ;",timeoutlength);
		}
		else {
			if (stampurl.indexOf("swf") != -1) {
	            //alert("sudah ada cookie");
                document.write("<div id=\"otp\" style=\"position: absolute; left: " + positionleft + "; top: " + positiontop + "; width: " + width + "; height: " + height + "\">");
				document.write("<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" WIDTH=\"" + width + "\" HEIGHT=\"" + height + "\" id=\"" + stampurl + "\" ALIGN=\"\">");
				document.write("<PARAM NAME=movie VALUE=\"" + stampurl + "\"><PARAM NAME=quality VALUE=high><PARAM NAME=wmode VALUE=transparent><PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src=\"" + stampurl + "\" quality=high bgcolor=#FFFFFF  WIDTH=\"" + width + "\" HEIGHT=\"" + height + "\" NAME=\"utusanonlineeyeblaster\" ALIGN=\"\" TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/go/getflashplayer\"></EMBED>");
				document.write("</OBJECT>");
				document.write("</div>");
			}
		}
	}
	else {
	}
}
1;