function Close(){};
function Link(){};
function readCookie(name) {
  var cookieValue = "";
  var search = name + "=";
  if(document.cookie.length > 0) { 
    offset = document.cookie.indexOf(search);
    if (offset != -1) { 
      offset += search.length;
      end = document.cookie.indexOf(";", offset);
      if (end == -1) end = document.cookie.length;
      cookieValue = unescape(document.cookie.substring(offset, end))
    }
  }
  return cookieValue;
}
function writeCookie(name, value, hours) {
  var expire = "";
  if(hours != null) {
    expire = new Date((new Date()).getTime() + hours * 3600000);
    expire = "; expires=" + expire.toGMTString();
  }
  document.cookie = name + "=" + escape(value) + expire;
}
function findObj(theObj, theDoc) {
  var p, i, foundObj;
  
  if(!theDoc) theDoc = document;
  if( (p = theObj.indexOf("?")) > 0 && parent.frames.length) {
    theDoc = parent.frames[theObj.substring(p+1)].document;
    theObj = theObj.substring(0,p);
  }
  if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
  for (i=0; !foundObj && i < theDoc.forms.length; i++) 
    foundObj = theDoc.forms[i][theObj];
  for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 
    foundObj = findObj(theObj,theDoc.layers[i].document);
  if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
  
  return foundObj;
}
function showHideLayers() { 
  var i, visStr, obj, args = showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) {
    if ((obj = findObj(args[i])) != null) {
      visStr = args[i+2];
      if (obj.style) {
        obj = obj.style;
        if(visStr == 'show') visStr = 'visible';
        else if(visStr == 'hide') visStr = 'hidden';
      }
      obj.visibility = visStr;
    }
  }
}
function CenterPopup(theObj) {
	var height, width, obj;
	width =  window.innerWidth || document.body.offsetWidth;
  height =  window.innerHeight || document.body.offsetHeight;
	obj = findObj(theObj);
	obj.style.left = (width / 2) - (parseInt(obj.style.width) / 2) + 'px';
	obj.style.top = (height / 2) - (parseInt(obj.style.height) / 2) + 'px';
}
var Timeout = 10;
var TimerID = null;
function StartAutoClose() {
	if (Timeout == 0) {
		StopAutoClose();
		dismiss();
	}
	else {
		Timeout = Timeout - 1;
		timerID = self.setTimeout("StartAutoClose()", 1000);
	}
}
function StopAutoClose() {
	clearTimeout(TimerID);
}
var detect;
function CheckBrowser(string) {
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}
function dismiss() {
	showHideLayers('pc_5051a', '', 'hide');
	showHideLayers('pc_5051b', '', 'hide');
	showHideLayers('pc_5051c', '', 'hide');
}
function jump() {
	window.open('http://www.focus-generator-software.com');
}
function DoLoad() {
	detect = navigator.userAgent.toLowerCase();
	var UseCookie = false;
	var AutoCenter = true;
	var AutoClose = false;
	if (readCookie("pc_5051") != 'yes') {
		if (AutoClose) {
			StartAutoClose();
		}
		if (CheckBrowser('msie')) {
			if (AutoCenter) {
					CenterPopup('pc_5051a');
					CenterPopup('pc_5051b');
			}
			showHideLayers('pc_5051a', '', 'show');
			showHideLayers('pc_5051b', '', 'show');
		}
		else {
			if (AutoCenter) {
				CenterPopup('pc_5051c');
			}
			showHideLayers('pc_5051c', '', 'show');
		}
		if (UseCookie) {
			writeCookie("pc_5051", "yes", 24);
		}
	}
	else {
		dismiss()
	}
}

document.write("<map name=\"Map\" id=\"Map\"><area shape=\"rect\" coords=\"214,278,229,293\" onClick='dismiss();' alt='Click to close' title='Close' target=_self >");
document.write("<area shape='rect' coords=\"0,0,262,337\" href='javascript:Link();' onClick='jump();dismiss();'  alt='' ></map>");

document.write("<div id=\"pc_5051a\" style=\"position:absolute; left:1px; top:1px; width:262px; height:342px; z-index:2000; visibility: hidden; overflow: auto;\"><img src=\"focusgenresources/blank.gif\" style=\"height: 1px; width: 1px; border: 0px; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='focusgenresources/pc_5051_shd.png',sizingMethod='image')\" /></div>");
document.write("<div id=\"pc_5051b\" style=\"position:absolute; left:1px; top:1px; width:262px; height:342px; z-index:2001; visibility: hidden; overflow: auto;\"><img src=\"focusgenresources/blank.gif\" style=\"height: 342px; width: 262px; border: 0px; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='focusgenresources/pc_5051.png',sizingMethod='image')\" usemap=\"#Map\" /></a></div>");
document.write("<div id=\"pc_5051c\" style=\"position:absolute; left:1px; top:1px; width:262px; height:342px; z-index:2000; background-image: url(focusgenresources/pc_5051_shd.png); layer-background-image: url(focusgenresources/pc_5051_shd.png); visibility: hidden; overflow: auto;\"><img src=\"focusgenresources/pc_5051.png\" style=\"border: 0px;\" usemap=\"#Map\" /></a></div>");

if (typeof window.addEventListener != "undefined") {
  window.addEventListener("load", DoLoad, false);
}
else if (typeof window.attachEvent != "undefined") {
  window.attachEvent("onload", DoLoad);
}
else {
	window.onload = DoLoad;
}
