// JavaScript Document


	$(document).ready(function(){
		
							   
							   
							   
		if($(document).getUrlParam("c")=='reg' || $(document).getUrlParam("p")=='users_mod'){
			$("#nameTxt").bind("focus", function(event){
				//$("#nameMSG").fadeOut(0);
				$("#emailMSG").hide(0);
				$("#yearMSG").hide(0);
				$("#monthMSG").hide(0);
				$("#dayMSG").hide(0);				
				$("#numMSG").hide(0);
				$("#cityMSG").hide(0);
				$("#addressMSG").hide(0);
				$("#contactMSG").hide(0);				
				$("#passMSG").hide(0);
                                $("#passMSG1").hide(0);
				$("#telMSG").hide(0);
				$("#nameMSG").fadeIn("slow");
   			});
			
			$("#emailTxt").bind("focus", function(event){
				
				$("#nameMSG").fadeOut(0);
				//$("#emailMSG").hide(0);
				$("#yearMSG").hide(0);
				$("#monthMSG").hide(0);
				$("#dayMSG").hide(0);				
				$("#numMSG").hide(0);
				$("#cityMSG").hide(0);
				$("#addressMSG").hide(0);
				$("#contactMSG").hide(0);				
				$("#passMSG").hide(0);
                                $("#passMSG1").hide(0);
				$("#telMSG").hide(0);
				$("#emailMSG").fadeIn("slow");
   			});
			
			/*$("#yearTxt").click(function(event){
				
				$("#nameMSG").fadeOut(0);
				$("#emailMSG").hide(0);
				//$("#yearMSG").hide(0);
				$("#monthMSG").hide(0);
				$("#dayMSG").hide(0);				
				$("#numMSG").hide(0);
				$("#cityMSG").hide(0);
				$("#addressMSG").hide(0);
				$("#contactMSG").hide(0);				
				$("#passMSG").hide(0);
				$("#telMSG").hide(0);
				$("#yearMSG").fadeIn("slow");
   			});
			
			$("#monthTxt").click(function(event){
				
				$("#nameMSG").fadeOut(0);
				$("#emailMSG").hide(0);
				$("#yearMSG").hide(0);
				//$("#monthMSG").hide(0);
				$("#dayMSG").hide(0);				
				$("#numMSG").hide(0);
				$("#cityMSG").hide(0);
				$("#addressMSG").hide(0);
				$("#contactMSG").hide(0);				
				$("#passMSG").hide(0);
				$("#telMSG").hide(0);
				$("#monthMSG").fadeIn("slow");
   			});
			
			$("#dayTxt").click(function(event){
				
				$("#nameMSG").fadeOut(0);
				$("#emailMSG").hide(0);
				$("#yearMSG").hide(0);
				$("#monthMSG").hide(0);
				//$("#dayMSG").hide(0);				
				$("#numMSG").hide(0);
				$("#cityMSG").hide(0);
				$("#addressMSG").hide(0);
				$("#contactMSG").hide(0);				
				$("#passMSG").hide(0);
				$("#telMSG").hide(0);
				$("#dayMSG").fadeIn("slow");
   			});
			*/
			$("#numTxt").bind("focus", function(event){
				
				$("#nameMSG").fadeOut(0);
				$("#emailMSG").hide(0);
				$("#yearMSG").hide(0);
				$("#monthMSG").hide(0);
				$("#dayMSG").hide(0);				
				//$("#numMSG").hide(0);
				$("#cityMSG").hide(0);
				$("#addressMSG").hide(0);
				$("#contactMSG").hide(0);				
				$("#passMSG").hide(0);
                                $("#passMSG1").hide(0);
				$("#telMSG").hide(0);
				$("#numMSG").fadeIn("slow");
   			});
			
			$("#cityTxt").bind("focus", function(event){
				
				$("#nameMSG").fadeOut(0);
				$("#emailMSG").hide(0);
				$("#yearMSG").hide(0);
				$("#monthMSG").hide(0);
				$("#dayMSG").hide(0);				
				$("#numMSG").hide(0);
				//$("#cityMSG").hide(0);
				$("#addressMSG").hide(0);
				$("#contactMSG").hide(0);				
				$("#passMSG").hide(0);
                                $("#passMSG1").hide(0);
				$("#telMSG").hide(0);
				$("#cityMSG").fadeIn("slow");
   			});
			
			$("#addressTxt").bind("focus", function(event){
				
				$("#nameMSG").fadeOut(0);
				$("#emailMSG").hide(0);
				$("#yearMSG").hide(0);
				$("#monthMSG").hide(0);
				$("#dayMSG").hide(0);				
				$("#numMSG").hide(0);
				$("#cityMSG").hide(0);
				//$("#addressMSG").hide(0);
				$("#contactMSG").hide(0);				
				$("#passMSG").hide(0);
                                $("#passMSG1").hide(0);
				$("#telMSG").hide(0);
				$("#addressMSG").fadeIn("slow");
   			});
			
			$("#contactTxt").bind("focus", function(event){
				
				$("#nameMSG").fadeOut(0);
				$("#emailMSG").hide(0);
				$("#yearMSG").hide(0);
				$("#monthMSG").hide(0);
				$("#dayMSG").hide(0);				
				$("#numMSG").hide(0);
				$("#cityMSG").hide(0);
				$("#addressMSG").hide(0);
				//$("#contactMSG").hide(0);	
				$("#passMSG").hide(0);
                                $("#passMSG1").hide(0);
				$("#telMSG").hide(0);
				$("#contactMSG").fadeIn("slow");
   			});
			
			$("#pass0Txt").bind("focus", function(event){
				
				$("#nameMSG").fadeOut(0);
				$("#emailMSG").hide(0);
				$("#yearMSG").hide(0);
				$("#monthMSG").hide(0);
				$("#dayMSG").hide(0);				
				$("#numMSG").hide(0);
				$("#cityMSG").hide(0);
				$("#addressMSG").hide(0);
				$("#contactMSG").hide(0);	
				//$("#passMSG").hide(0);
				$("#telMSG").hide(0);
				$("#passMSG").fadeIn("slow");
                                $("#passMSG1").hide(0);
   			});
			
			$("#pass1Txt").bind("focus", function(event){
				
				$("#nameMSG").fadeOut(0);
				$("#emailMSG").hide(0);
				$("#yearMSG").hide(0);
				$("#monthMSG").hide(0);
				$("#dayMSG").hide(0);				
				$("#numMSG").hide(0);
				$("#cityMSG").hide(0);
				$("#addressMSG").hide(0);
				$("#contactMSG").hide(0);	
				//$("#passMSG").hide(0);
				$("#telMSG").hide(0);
                                $("#passMSG").hide(0);
				$("#passMSG1").fadeIn("slow");
   			});
			
			$("#telTxt").bind("focus", function(event){
				
				$("#nameMSG").fadeOut(0);
				$("#emailMSG").hide(0);
				$("#yearMSG").hide(0);
				$("#monthMSG").hide(0);
				$("#dayMSG").hide(0);				
				$("#numMSG").hide(0);
				$("#cityMSG").hide(0);
				$("#addressMSG").hide(0);
				$("#contactMSG").hide(0);	
				$("#passMSG").hide(0);
                                $("#passMSG1").hide(0);
				//$("#telMSG").hide(0);
				$("#telMSG").fadeIn("slow");
   			});
			
					
			/*$("#nameTxt").focus(function(event){
				
				//$("#nameMSG").fadeOut(0);
				$("#emailMSG").hide(0);
				$("#yearMSG").hide(0);
				$("#monthMSG").hide(0);
				$("#dayMSG").hide(0);				
				$("#numMSG").hide(0);
				$("#cityMSG").hide(0);
				$("#addressMSG").hide(0);
				$("#contactMSG").hide(0);				
				$("#passMSG").hide(0);
				$("#telMSG").hide(0);
				$("#nameMSG").fadeIn("slow");
   			});
			
			$("#emailTxt").focus(function(event){
				
				$("#nameMSG").fadeOut(0);
				//$("#emailMSG").hide(0);
				$("#yearMSG").hide(0);
				$("#monthMSG").hide(0);
				$("#dayMSG").hide(0);				
				$("#numMSG").hide(0);
				$("#cityMSG").hide(0);
				$("#addressMSG").hide(0);
				$("#contactMSG").hide(0);				
				$("#passMSG").hide(0);
				$("#telMSG").hide(0);
				$("#emailMSG").fadeIn("slow");
   			});
			
			$("#yearTxt").focus(function(event){
				
				$("#nameMSG").fadeOut(0);
				$("#emailMSG").hide(0);
				//$("#yearMSG").hide(0);
				$("#monthMSG").hide(0);
				$("#dayMSG").hide(0);				
				$("#numMSG").hide(0);
				$("#cityMSG").hide(0);
				$("#addressMSG").hide(0);
				$("#contactMSG").hide(0);				
				$("#passMSG").hide(0);
				$("#telMSG").hide(0);
				$("#yearMSG").fadeIn("slow");
   			});
			
			$("#monthTxt").focus(function(event){
				
				$("#nameMSG").fadeOut(0);
				$("#emailMSG").hide(0);
				$("#yearMSG").hide(0);
				//$("#monthMSG").hide(0);
				$("#dayMSG").hide(0);				
				$("#numMSG").hide(0);
				$("#cityMSG").hide(0);
				$("#addressMSG").hide(0);
				$("#contactMSG").hide(0);				
				$("#passMSG").hide(0);
				$("#telMSG").hide(0);
				$("#monthMSG").fadeIn("slow");
   			});
			
			$("#dayTxt").focus(function(event){
				
				$("#nameMSG").fadeOut(0);
				$("#emailMSG").hide(0);
				$("#yearMSG").hide(0);
				$("#monthMSG").hide(0);
				//$("#dayMSG").hide(0);				
				$("#numMSG").hide(0);
				$("#cityMSG").hide(0);
				$("#addressMSG").hide(0);
				$("#contactMSG").hide(0);				
				$("#passMSG").hide(0);
				$("#telMSG").hide(0);
				$("#dayMSG").fadeIn("slow");
   			});
			
			$("#numTxt").focus(function(event){
				
				$("#nameMSG").fadeOut(0);
				$("#emailMSG").hide(0);
				$("#yearMSG").hide(0);
				$("#monthMSG").hide(0);
				$("#dayMSG").hide(0);				
				//$("#numMSG").hide(0);
				$("#cityMSG").hide(0);
				$("#addressMSG").hide(0);
				$("#contactMSG").hide(0);				
				$("#passMSG").hide(0);
				$("#telMSG").hide(0);
				$("#numMSG").fadeIn("slow");
   			});
			
			$("#cityTxt").focus(function(event){
				
				$("#nameMSG").fadeOut(0);
				$("#emailMSG").hide(0);
				$("#yearMSG").hide(0);
				$("#monthMSG").hide(0);
				$("#dayMSG").hide(0);				
				$("#numMSG").hide(0);
				//$("#cityMSG").hide(0);
				$("#addressMSG").hide(0);
				$("#contactMSG").hide(0);				
				$("#passMSG").hide(0);
				$("#telMSG").hide(0);
				$("#cityMSG").fadeIn("slow");
   			});
			
			$("#addressTxt").focus(function(event){
				
				$("#nameMSG").fadeOut(0);
				$("#emailMSG").hide(0);
				$("#yearMSG").hide(0);
				$("#monthMSG").hide(0);
				$("#dayMSG").hide(0);				
				$("#numMSG").hide(0);
				$("#cityMSG").hide(0);
				//$("#addressMSG").hide(0);
				$("#contactMSG").hide(0);				
				$("#passMSG").hide(0);
				$("#telMSG").hide(0);
				$("#addressMSG").fadeIn("slow");
   			});
			
			$("#contactTxt").focus(function(event){
				
				$("#nameMSG").fadeOut(0);
				$("#emailMSG").hide(0);
				$("#yearMSG").hide(0);
				$("#monthMSG").hide(0);
				$("#dayMSG").hide(0);				
				$("#numMSG").hide(0);
				$("#cityMSG").hide(0);
				$("#addressMSG").hide(0);
				//$("#contactMSG").hide(0);				
				$("#passMSG").hide(0);
				$("#telMSG").hide(0);
				$("#contactMSG").fadeIn("slow");
   			});
			
			$("#pass0Txt").focus(function(event){
				
				$("#nameMSG").fadeOut(0);
				$("#emailMSG").hide(0);
				$("#yearMSG").hide(0);
				$("#monthMSG").hide(0);
				$("#dayMSG").hide(0);				
				$("#numMSG").hide(0);
				$("#cityMSG").hide(0);
				$("#addressMSG").hide(0);
				$("#contactMSG").hide(0);	
				//$("#passMSG").hide(0);
				$("#telMSG").hide(0);
				$("#passMSG").fadeIn("slow");
   			});
			
			$("#pass1Txt").focus(function(event){
				
				$("#nameMSG").fadeOut(0);
				$("#emailMSG").hide(0);
				$("#yearMSG").hide(0);
				$("#monthMSG").hide(0);
				$("#dayMSG").hide(0);				
				$("#numMSG").hide(0);
				$("#cityMSG").hide(0);
				$("#addressMSG").hide(0);
				$("#contactMSG").hide(0);	
				//$("#passMSG").hide(0);
				$("#telMSG").hide(0);
				$("#passMSG").fadeIn("slow");
   			});
			
			$("#telTxt").focus(function(event){
				
				$("#nameMSG").fadeOut(0);
				$("#emailMSG").hide(0);
				$("#yearMSG").hide(0);
				$("#monthMSG").hide(0);
				$("#dayMSG").hide(0);				
				$("#numMSG").hide(0);
				$("#cityMSG").hide(0);
				$("#addressMSG").hide(0);
				$("#contactMSG").hide(0);	
				$("#passMSG").hide(0);
				//$("#telMSG").hide(0);
				$("#tellMSG").fadeIn("slow");
   			});
			
			*/
			
		}	
		
		
		
		
		$("#btn_user").click(function(event){
			/*if($(document).getUrlParam("c")=='reg'){
				$("#error_1").hide(0);
				$("#error_2").hide(0);
				$("#error_3").hide(0);
				$("#error_3").hide(0);
				$("#error_4").hide(0);
				$("#add_user").hide(0);
				
				if(		document.getElementById("nameTxt").value != ''		&&	
						document.getElementById("emailTxt").value != ''		&&	
						document.getElementById("numTxt").value != ''		&&
						document.getElementById("pass0Txt").value != ''		&&
						document.getElementById("pass1Txt").value != ''		&&
						document.getElementById("cityTxt").value != ''		&&
						document.getElementById("addressTxt").value != ''	
					){
						apos=document.getElementById("emailTxt").value.indexOf("@");
						dotpos=document.getElementById("emailTxt").value.lastIndexOf(".");
						if (apos<1||dotpos-apos<2){$("#error_2").show(0);}
						else{
							if(document.getElementById("pass0Txt").value ==	document.getElementById("pass1Txt").value){
								$("#add_user").show(0);
							}else{$("#error_3").show(0);}
						}
				}else{$("#error_1").show(0);}
			}*/
			
			if($(document).getUrlParam("p")=='users_mod'){
				$("#error_1").hide(0);
				$("#error_2").hide(0);
				$("#error_3").hide(0);
				$("#mod_user").hide(0);
				
				if(		document.getElementById("usernameTxt").value != '' 	&&
						document.getElementById("nameTxt").value != ''		&&	
						document.getElementById("emailTxt").value != ''		&&	
						document.getElementById("numTxt").value != ''		&&
						document.getElementById("cityTxt").value != ''		&&
						document.getElementById("addressTxt").value != ''	
					){
						apos=document.getElementById("emailTxt").value.indexOf("@");
						dotpos=document.getElementById("emailTxt").value.lastIndexOf(".");
						if (apos<1||dotpos-apos<2){$("#error_2").slideDown("slow");}
						else{
								$("#mod_user").slideDown("slow");
						}
				}else{$("#error_1").slideDown("slow");}
			}
		});
		/* ---------------- */

                loc = window.document.location.toString();
		if(($(document).getUrlParam("c")=='order' && !($(document).getUrlParam("p"))) || loc.substr(loc.length - 14) == "Domain-hu.html"){
			$("#addDomain").click(function(event){  
				if($("#tr2").is(':hidden')){$("#tr2").fadeIn("slow");}else{
					if($("#tr3").is(':hidden')){$("#tr3").fadeIn("slow");}else{
						if($("#tr4").is(':hidden')){$("#tr4").fadeIn("slow");}else{
							if($("#tr5").is(':hidden')){$("#tr5").fadeIn("slow");}else{
								if($("#tr6").is(':hidden')){$("#tr6").fadeIn("slow");}else{
									if($("#tr7").is(':hidden')){$("#tr7").fadeIn("slow");}else{
										if($("#tr8").is(':hidden')){$("#tr8").fadeIn("slow");}else{
											if($("#tr9").is(':hidden')){$("#tr9").fadeIn("slow");}else{
												if($("#tr10").is(':hidden')){$("#tr10").fadeIn("slow");}		
											}		
										}		
									}		
								}		
							}		
						}		
					}		
				}		
			});
			
			$("#ch_szerzodes").click(function(event){  
				if($("#ch_szerzodes").is(':checked')){
					document.form.submitBtn.disabled=false;
				}else{
					document.form.submitBtn.disabled=true;
				}
			});
			
                       /* $("#selectHosting").bind("change", function(event){
                            console.log($("#selectHosting"));
                            if ($("#selectHosting").value == "-1")
                            {
                                for (i = 1; i <= 10; i++)
                                {
                                    console.log("#tr" + i);
                                    $("#tr" + i).style.display = "none";
                                }
                            } else
                            {
                                for (i = 2; i <= 10; i++)
                                {
                                    $("#tr" + i).style.display = "none";
                                }
                                $("#tr1").style.display = "";
                            }
                        });*/
                }
		
		
		
		
		
		if($(document).getUrlParam("p")=='40' || !($(document).getUrlParam("p")) || $(document).getUrlParam("p")=='50'){
			var popupStatus = 0;  
			$("#div_rej_1").click(function(event){
					centerPopup();
					loadPopup(1);	   
			});
			$("#div_rejx_1").click(function(event){disablePopup(1);});
			
			$("#div_rej_2").click(function(event){
					centerPopup();
					loadPopup(2);	   
			});
			$("#div_rejx_2").click(function(event){disablePopup(2);});
			
			$("#div_rej_3").click(function(event){
					centerPopup();
					loadPopup(3);	   
			});
			$("#div_rejx_3").click(function(event){disablePopup(3);});
			
			$("#div_rej_4").click(function(event){
					centerPopup();
					loadPopup(4);	   
			});
			$("#div_rejx_4").click(function(event){disablePopup(4);});
			
			$("#div_rej_5").click(function(event){
					centerPopup();
					loadPopup(5);	   
			});
			$("#div_rejx_5").click(function(event){disablePopup(5);});
			
			$("#div_rej_6").click(function(event){
					centerPopup();
					loadPopup(6);	   
			});
			$("#div_rejx_6").click(function(event){disablePopup(6);});
			
			$("#div_rej_7").click(function(event){
					centerPopup();
					loadPopup(7);	   
			});
			$("#div_rejx_7").click(function(event){disablePopup(7);});
			
			$("#div_rej_8").click(function(event){
					centerPopup();
					loadPopup(8);	   
			});
			$("#div_rejx_8").click(function(event){disablePopup(8);});
			
			$("#div_rej_9").click(function(event){
					centerPopup();
					loadPopup(9);	   
			});
			$("#div_rejx_9").click(function(event){disablePopup(9);});
			
			$("#div_rej_10").click(function(event){
					centerPopup();
					loadPopup(10);	   
			});
			$("#div_rejx_10").click(function(event){disablePopup(10);});
			
			
			function centerPopup(){  
					var windowWidth = document.documentElement.clientWidth;  
					var windowHeight = document.documentElement.clientHeight;  
					var popupHeight = $("#popupContact").height();  
					var popupWidth = $("#popupContact").width();  
					$("#popupContact").css({  
						"position": "absolute",  
						"top": (windowHeight/2)-(popupHeight),  
						"left": (windowWidth/2)-(popupWidth) 				
					});  
					$("#backgroundPopup").css({"height": windowHeight});  
				}
			
				function loadPopup(i){  
						if(popupStatus==0){  
							$("#div_"+i).show(0);  
							$("#backgroundPopup").css({"opacity": "0.8"});  
							$("#backgroundPopup").fadeIn("slow");  
							$("#popupContact").fadeIn("slow");  
							popupStatus = 1;  
						}
					}  
					
					
				function disablePopup(i){  
					if(popupStatus==1){
						$("#backgroundPopup").fadeOut("slow");  
						$("#popupContact").fadeOut("slow");  
						$("#div_"+i).hide(0);
						popupStatus = 0;  
						}  
				}  
			
				
				
				
						
				$("#backgroundPopup").click(function(){  
					disablePopup();  
				});  
				
						
				$("#btnClosed").click(function(){  
					centerPopup();  
					loadPopup();  
				});
			
		}
		
	});
	
	
	
	
	

        var toShow = null

	/*function hostingChange(value)
        {
            if (value != "-1")
            {
                toShow = new Array();
                for (i = 1; i <= 10; i++)
                {
                    tr = document.getElementById("tr" + i);
                    //console.log(tr);
                    if (tr.style.display != "none")
                    {
                        toShow[toShow.length] = i;
                    }
                }
                for (i = 1; i <= 10; i++)
                {
                    document.getElementById("tr" + i).style.display = "none";
                }
                document.getElementById("domainReq").style.display = "none";
            } else
            {
                
                if (toShow)
                {
                    document.getElementById("tr1").style.display = "";
                    for (i = 2; i <= 10; i++)
                    {
                        document.getElementById("tr" + i).style.display = "none";
                    }
                    for (i = 0; i < toShow.length; i++)
                    {
                        document.getElementById("tr" + toShow[i]).style.display = "";
                    }
                    toShow = null;
                } else
                {
                    document.getElementById("tr1").style.display = "";
                }

                document.getElementById("domainReq").style.display = "";
            }
            console.log(toShow);
        }*/
	
	
	
	
	
	
	
	
