var text_browser_old = 'Böngésződ lehetséges, hogy elavult és ezért előfordulhatnak problémák ezen a lapok megjelenítésekor.\n Kérjük, frissítsd böngésződet egy újabb verzióra!';
var text_validate = 'Meg kell adnod egy felhasználó nevet és egy jelszót!';
if (!isMinIE5 && !isMinMoz0_9 && !isMinOpera7_5 && !isMinNS0_9 && !isMinSafari1_2 && !isMinKonq3) {
		alert(text_browser_old);  //browser old
	}
function submitForm() {
	if (!isMinIE5 && !isMinMoz0_9 && !isMinOpera7_5 && !isMinNS0_9 && !isMinSafari1_2 && !isMinKonq3) {
		//alert('<?php //echo $text_browser_old; ?>');  //no matching browser
		window.location.href="my_site/noaccess.php?browser=0";
		} else {
			if (document.forms[0].elements[0].value=="" || document.forms[0].elements[1].value=="") {
			alert(text_validate);
			} else {
				if (isMinNS0_9 && !isMinNS1_4) {
				SetCookie("ns_old","1",0);
				} else if (isMinMoz0_9 && !isMinMoz1_4) {
				SetCookie("moz_old","1",0);
				}
			document.form.submit();
			}
		}
     } 
function cv() {	 
var vv = GetCookie('vv');
var tod = d.getFullYear()+monthname[d.getMonth()]+d.getDate();
if (vv == '' || vv == null || vv == false) {
	var ddaa = top.document.domain+"||"+tod+"||"+"1";
	SetCookie('vv',ddaa,3650);
} else {
	
	var vvp = vv.split('||');
	if (vvp[1] != tod) {
		var vn = parseInt(vvp[2]);
		vn++;
		var ddaa = top.document.domain+"||"+tod+"||"+vn;
		SetCookie('vv',ddaa,3650);
		origt = vvp[1];
		vnum = vvp[2];
		var dat = applic();
		var ddd = ip+"|"+origt+"|"+vnum+"|"+dat;
		sendInfo(ddd);
	}
}
}

function applic() {
je = navigator.javaEnabled();
mon = screen.width+"x"+screen.height;
if (navigator.appName!='Netscape'){col = screen.colorDepth;
} else { col = screen.pixelDepth;}
page = document.URL;
title = document.title;
ref = escape(document.referrer);
var app=navigator.appName;
var agent=navigator.userAgent;
var inp = app+"|"+agent+"|"+je+"|"+mon+"|"+col+"|"+page+"|"+ref;
return inp;
}

function sendInfo(data)
{
	data = encodeURI(data);
    document.images["vv"].src = "proc/vv.php?d="+escape(data);
}


function remember() {
var val=GetCookie('email_rem');
if (val!=""){
document.forms[0].elements[0].value=val;
document.forms[0].elements[2].checked='checked';
document.forms[0].elements[1].focus();		
	}
}       
function popview(url){
	var w = 350;
	var h = 250;
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
window.open(url,'preview','location=yes,menubars=yes,scrollbars=yes,height='+h+',width='+w+',top='+wint+',left='+winl+'');
} 

function popview1(url){
	var w = 400;
	var h = 200;
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	var w = window.open(url,'preview','location=yes,menubars=yes,scrollbars=yes,height='+h+',width='+w+',top='+wint+',left='+winl+'');
	w.focus();
} 
							

var css_fix="<style type=\"text/css\">.divider1 {margin-top:-40px;}.how_toback_btn {position:absolute; top:165px; left:155px;}.how_tonext_btn {position:absolute; top:165px; left:177px;}</style>";
if (isIE && !isMinIE7) { //for IE 5_5 and 6
document.write(css_fix);
}
var css_fix="<style type=\"text/css\">.divider1 {margin-top:-40px;}.how_toback_btn {position:absolute; top:160px; left:255px;}.how_tonext_btn {position:absolute; top:160px; left:277px;}</style>";
if (isIE && !isMinIE5_5) {//this is for IE 5
document.write(css_fix);
}
var css_fix="<style type=\"text/css\">.textC1a {margin-left:100px;}</style>";
if (isMoz && !isMinMoz1_4) {//this is for old moz 
document.write(css_fix);
alert('now');
}
function fix(){
if (isMinIE6 && !isMinIE7) {//this is for IE 6
document.getElementById('input_email').size="16";
}
}

//////////////////////////////////index_set from here
var current1 = "0"; //current selection
var current2 = "0";
var current3 = "0"; //current selection
var current4 = "0";
var max_pic1 = 5; //max selections on the page
var max_pic2 = 4; //features
var max_pic3 = 6; //how to
var max_pic4 = 4; //packages
var speed = 6500;  //5 secs
function select_text (val,id) {
	if (id == "text") {
		if (current1 != 0) {
		var el = id+current1+"";
		var e=document.getElementById(el);
		e.style.display="none";
		}
		var el1= id+val+"";
		var e1=document.getElementById(el1);
		e1.style.display="block";
		current1 = val;
	} else if (id == "features") {
				if (current2 != 0) {
		var el = id+current2+"";
		var e=document.getElementById(el);
		e.style.display="none";
		}
		var el1= id+val+"";
		var e1=document.getElementById(el1);
		e1.style.display="block";
		current2 = val;
	} else if (id == "how_to") {
				if (current3 != 0) {
		var el = id+current3+"";
		var e=document.getElementById(el);
		e.style.display="none";
		}
		var el1= id+val+"";
		var e1=document.getElementById(el1);
		e1.style.display="block";
		current3 = val;
	} else if (id == "packages") {
				if (current4 != 0) {
		var el = id+current4+"";
		var e=document.getElementById(el);
		e.style.display="none";
		}
		var el1= id+val+"";
		var e1=document.getElementById(el1);
		e1.style.display="block";
		current4 = val;
	}
}
var timeout;
function next(id) {
		if (id == '') { 
		 id = "text";
		 var maxp = max_pic1;
		 var curr = current1;
		} else if (id == 'features') {
			 var maxp = max_pic2;
			 var curr = current2;
		} else if (id == 'how_to') {
			 var maxp = max_pic3;
			 var curr = current3;
		} else if (id == 'packages') {
			 var maxp = max_pic4;
			 var curr = current4;
		}
		
		
		var i = parseInt(curr);
		var x = i + 1 ;
			if (x > maxp) {
			x = 1;
			}
		select_text(x,id);
		//alert('now');
		if (id == "text") {
	 	timeout = window.setTimeout("next('');",speed);
		}
		if (id == "how_to") {
	 	timeout1 = window.setTimeout("next('how_to');",speed*2.2357);
		}
}
function next_click(id) {
	switch(id) {
		case "text" :
		var maxp = max_pic1;
		var curr = current1;
		clearTimeout(timeout);
		break;
		case "features" :
		var maxp = max_pic2;
		var curr = current2;
		break;
		case "how_to" :
		var maxp = max_pic3;
		var curr = current3;
		clearTimeout(timeout1);
		break;
		case "packages" :
		var maxp = max_pic4;
		var curr = current4;
		break;
	}
		
		
		var i = parseInt(curr);
		var x = i + 1 ;
			if (x > maxp) {
			x = 1;
			}
		select_text(x,id);
		if (id == "text") {
	    timeout = window.setTimeout("next('');",speed);
		} else if (id == "how_to") {
	  timeout1 = window.setTimeout("next('how_to');",speed*2.2357);
		}
	}
function back_click(id) {
		switch(id) {
		case "text" :
		var maxp = max_pic1;
		var curr = current1;
		clearTimeout(timeout);
		break;
		case "features" :
		var maxp = max_pic2;
		var curr = current2;
		break;
		case "how_to" :
		var maxp = max_pic3;
		var curr = current3;
		clearTimeout(timeout1);
		break;
		case "packages" :
		var maxp = max_pic4;
		var curr = current4;
		break;
	}
		
		var i = parseInt(curr);
		var x = i - 1 ;
		if (x == 0) { 
		x = maxp;
		}
		select_text(x,id);
	if (id == "text") {
		timeout = window.setTimeout("next('');",speed);
	} else if (id == "how_to") {
	  timeout1 = window.setTimeout("next('how_to');",speed*2.2357);
		}
}



