function popcenter(uri,wi,he,poptype) {
    var strscroll=",resizable=0";
    if(poptype=="narrow"){
        wi=parseInt(wi)+16; he=parseInt(he)+16;       
        var strscroll=",resizable=0";
    }else if(poptype=="picture"){
        wi=parseInt(wi)+44; he=parseInt(he)+100;
        var strscroll=",resizable=1";
    }else if(poptype=="wide"){
        wi=parseInt(window.screen.availWidth*.8); he=parseInt(window.screen.availHeight*.95);
        var strscroll=",scrollbars=1,resizable=1";
    }else{
        wi=parseInt(wi)+16; he=parseInt(he)+16;
        var strscroll=",resizable=1";
    }
    var w=(window.screen.availWidth-wi)/2-16;
    var h=(window.screen.availHeight-he)/2-16;
    if(wi>window.screen.availWidth-24 || he>window.screen.availHeight-24){ strscroll=",scrollbars=1,resizable=1";}
    str="width="+wi+",height="+he+",top="+h+",left="+w+""+strscroll+"";

    zoom=window.open(uri,"zoom",str);
}

/************************************************************************/
/************************ ajax START ************************************/
/************************************************************************/
// FORM_TYPE - form field tipusa, FORM_ID - from field bemeneti id-je
function AjaxAddtoCart(AJAXRQST,FORM_ID,FORM_VALUE1,FORM_VALUE2,FORM_VALUE3,FORM_VALUE4,FORM_VALUE5,FORM_VALUE6,DIV_ID){
	var ajaxRequest;  // The variable that makes Ajax possible!

	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			var ajaxDisplay = document.getElementById(DIV_ID);
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}
	}
	
	var value1 = document.getElementById(FORM_VALUE1).value;
	var value2 = document.getElementById(FORM_VALUE2).value;
	var value3 = document.getElementById(FORM_VALUE3).value;
	var value4 = document.getElementById(FORM_VALUE4).value;
	var value5 = document.getElementById(FORM_VALUE5).value;
	var value6 = document.getElementById(FORM_VALUE6).value;		
	var queryString = "?ajaxrqst="+ AJAXRQST + "&formID=" + FORM_ID + "&userid=" + value1 + "&pID=" + value2 + "&price=" + value3 +"&currency=" + value4 + "&size=" + value5 +"&qty=" + value6;
	ajaxRequest.open("GET", "include/ajaxrqst.php" + queryString, true);
	ajaxRequest.send(null);
	document.getElementById('qty['+value1+']').value = ''; // Kitoroljuk a fieldet, hogy a user valtozast lasson	
} 
/************************************************************************/
/************************ ajax END *************************************/
/************************************************************************/
// Mouseover kep
function MouseOverPic(id,action){
	if(action == "show"){
		if(document.layers){
			document.layers[''+id+''].visibility = "show";
		} else if(document.all){
			document.all[''+id+''].style.visibility = "visible";
		} else if(document.getElementById){
			document.getElementById(''+id+'').style.visibility = "visible";
		}
	} else {
		if(action == "hide"){
			if (document.layers){
				document.layers[''+id+''].visibility = "hide";
			} else if(document.all){
				document.all[''+id+''].style.visibility = "hidden";
			} else if(document.getElementById){
				document.getElementById(''+id+'').style.visibility = "hidden";
			}
		}
	}
}
