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 = 8;
var TimerID = null;
function StartAutoClose() {
	if (Timeout == 0) {
		StopAutoClose();
		dismiss();
	}
	else {
		Timeout = Timeout - 1;
		timerID = self.setTimeout("StartAutoClose()", 25000);
	}
}
function StopAutoClose() {
	clearTimeout(TimerID);
}
var detect;
function CheckBrowser(string) {
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}
function dismiss() {
	showHideLayers('pc_1353a', '', 'hide');
	showHideLayers('pc_1353b', '', 'hide');
	showHideLayers('pc_1353c', '', 'hide');
}
function jump() {
	window.open('http://silihost.hu/szerverunk/');
}
function DoLoad() {
	 /*Kinullázzuk a cuccot*/
	document.subscribeform.name.value="";
	document.subscribeform.email.value="";
	document.subscribeform.dp773.value="";
	document.subscribeform.hirlevel.checked=false;
	detect = navigator.userAgent.toLowerCase();
	var UseCookie = false;
	var AutoCenter = true;
	var AutoClose = true;
	if (readCookie("pc_1353") != 'yes') {
		if (AutoClose) {
			StartAutoClose();
		}
		if (CheckBrowser('msie')) {
			if (AutoCenter) {
					/*CenterPopup('pc_1353a');*/
					CenterPopup('pc_1353b');
			}
			/*showHideLayers('pc_1353a', '', 'show');*/
			showHideLayers('pc_1353b', '', 'show');
		}
		else {
			if (AutoCenter) {
				CenterPopup('pc_1353c');
			}
			showHideLayers('pc_1353c', '', 'show');
		}
		if (UseCookie) {
			writeCookie("pc_1353", "yes", 24);
		}
	}
	else {
		dismiss()
	}
}

/*Stíluslap az űrlaphoz*/
document.write("<style type=\"text/css\">.input{border:none; font-size: 11px; background-image: url(focusgenresources1/input.png); background-repeat:no-repeat; height: 17px; vertical-align:middle;padding-top:3px;padding-left:2px;padding-right:2px;width:151px;}</style>");
document.write("<style type=\"text/css\">.input_btt{border:none; font-size: 11px; background-image: url(focusgenresources1/input_btt.png); background-repeat:no-repeat; height: 21px; vertical-align:middle;width:70px;cursor:pointer;}</style>");
document.write("<style type=\"text/css\">.checkbox{cursor:pointer;}</style>");

/*Egy kis JS*/
function submitform() {
var hirlevelvalue;
if(document.getElementById('hirlevel').checked) { hirlevelvalue = "1"; } else { hirlevelvalue = "0"; }
if(document.getElementById('name').value=="" || document.getElementById('email').value=="" || document.getElementById('dp773').value=="")
  { window.location="http://silihost.hu/tavoktatas.html?name="+document.getElementById('name').value+"&email="+document.getElementById('email').value+"&dp773="+document.getElementById('dp773').value+"&hirlevel="+hirlevelvalue+"&ok=1"; }
  else
  { document.subscribeform.submit(); }
}
/*
var myDate = new Date();
var year   = myDate.getFullYear();
var month  = myDate.getMonth()+1;
var day    = myDate.getDate();
var md5fid = hex_md5(""+year+""+month+""+day+"");
*/
/*Map -ok*/
document.write("<map name=\"Map\" id=\"Map\"><area style=\"cursor:pointer;\" shape=\"rect\" coords=\"317,63,341,91\" onclick=\"dismiss();\" alt=\"Bezáráshoz kattintson ide\" title=\"Bezár\" target=\"_self\" /><area style=\"cursor:pointer;\" shape=\"rect\" coords=\"240,300,340,450\" onclick=\"submitform();document.subscribeform.hirlevel.checked=true;\" alt=\"Kérem a Google titkok e-könyvet\" title=\"Kérem a Google titkok e-könyvet\" target=\"_self\" /></map>");

/*Ez azért kell, hogy ne legyen több form a lapon ugyanazzal a névvel*/
detect = navigator.userAgent.toLowerCase();
if(CheckBrowser('msie')) {
document.write("<div id=\"pc_1353b\" style=\"position:absolute; left:1px; top:1px; width:490px; height:550px; z-index:2000; visibility: hidden; overflow: hidden;\"><img src=\"focusgenresources1/blank.gif\" style=\"height: 550px; width: 490px; border: 0px; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='focusgenresources1/pc_1353.png',sizingMethod='image')\" usemap=\"#Map\">");
printform();
document.write("</div>");
} else {
document.write("<div id=\"pc_1353c\" style=\"position:absolute; left:1px; top:1px; width:490px; height:550px; z-index:2000; visibility: hidden; overflow: auto;\"><img src=\"focusgenresources1/pc_1353.png\" usemap=\"#Map\" border=\"0\">");
printform();
document.write("</div>");
}

/*Itt kezdődnek az űrlapok*/
function printform() {
document.write("<div style=\"position:absolute; height:100px; top:205px; left: 42px; z-index:3000; overflow:hidden;\"><form name=\"subscribeform\" method=\"post\" action=\"register.php\"><table style=\"width: 350px; font-family: arial; font-size: 12px;\"><tr><td><b>Név:</b></td><td><input type=\"text\" class=\"input\" id=\"name\" name=\"name\" size=\"20\" maxlength=\"40\" > *</td></tr><tr><td><b>Email:</b></td><td><input type=\"text\" class=\"input\" id=\"email\" name=\"email\" size=\"20\" maxlength=\"40\" > *</td></tr><tr><td><b>Lakcím:</b></td><td><input type=\"text\" class=\"input\" id=\"dp773\" name=\"dp773\" size=\"20\" maxlength=\"40\"> *</td></tr><tr><td align=\"right\"><br /><input type=\"button\" class=\"input_btt\" value=\"Tovább\" onclick=\"submitform();\"></td><td>&nbsp;</td></tr></table></div><div style=\"position:absolute; top:325px; left: 42px; z-index:3000;\"><table style=\"width: 200px; font-family: arial; font-size: 12px;\" border=\"0\"><tr><td><input type=\"checkbox\" class=\"checkbox\" id=\"hirlevel\" name=\"hirlevel\" value=\"1\"><b>Emellett kérem a Silihost<br />hírlevelét is, melyhez<br />ajándékba jár a következő<br />e-könyv:</b></td></tr><tr><td align=\"left\" style=\"padding-left:33px;\"><br /><form><input type=\"button\" class=\"input_btt\" value=\"Tovább\" onclick=\"submitform();\"></td></tr></table></form></div></div>");
}
/*Itt van vége az űrlapoknak*/


if (typeof window.addEventListener != "undefined") {
  window.addEventListener("load", DoLoad, false);
}
else if (typeof window.attachEvent != "undefined") {
  window.attachEvent("onload", DoLoad);
}
else {
	window.onload = DoLoad;
}


var win=null;
function NewWindow(mypage,myname,w,h,pos,infocus){if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center'&&pos!="random")||pos==null){myleft=0;mytop=20}
settings="width="+w+",height="+h+",top="+mytop+",left="+myleft+",scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";win=window.open(mypage,myname,settings);win.focus();}