function changeFoto(foto, fotosNr)
{
	userfoto = document.getElementById("item_foto");
	userfoto.src = foto;
}

function intercept()
{
	
        xajax.realCall = xajax.call;
    	xajax.call = function(sFunction, aArgs, sRequestType)
    	{
   			xajax.$('eventWindow').style.display='block'; 
       		xajax.$('mainForm').style.display='none';
       		return this.realCall(sFunction, aArgs, sRequestType);
    	}    	
    	
    	xajax.realProcessResponse = xajax.processResponse;
    	xajax.processResponse = function(xml)
    	{           		
            xajax.$('eventWindow').style.display = 'none';
            xajax.$('mainForm').style.display='block';                    
        	return this.realProcessResponse(xml);
    	}     
}

function submitOrderItems()
{		
	xajax_submitOrderItems(xajax.getFormValues("saveInfo"));
	return false;
}

function submitAnketa()
{		
	xajax_submitAnketa(xajax.getFormValues("saveInfo"));
	return false;
}

function submitSendRecommend()
{		
	xajax_submitSendRecommend(xajax.getFormValues("saveInfo"));
	return false;
}

function submitOrderNews()
{		
	xajax_submitOrderNews(xajax.getFormValues("saveInfo"));
	return false;
}

function submitSendDUK()
{		
	xajax_submitSendDUK(xajax.getFormValues("saveInfo"));
	return false;
}

function submitComment()
{		
	xajax_submitComment(xajax.getFormValues("saveInfo"));
	return false;
}


function openPopup(path, width, height) 
{
	xposition=70; yposition=40;
	//height=600;
	//width=710;
	if ((parseInt(navigator.appVersion) >= 4 ))
	{
		xposition = (screen.width - width) / 2;
		yposition = (screen.height - height) / 2;
	} 
	args = "width=" + width + "," 
		    + "height=" + height + "," 
			+ "location=0," 
			+ "menubar=0,"
			+ "resizable=0,"
			+ "scrollbars=yes,"
			+ "status=0," 
			+ "titlebar=0,"
			+ "toolbar=0,"
			+ "hotkeys=0,"
			+ "screenx=" + xposition + ","  //NN Only
			+ "screeny=" + yposition + ","  //NN Only
			+ "left=" + xposition + ","     //IE Only
			+ "top=" + yposition;           //IE Only 
	
    popup = window.open(path, '', args);
    popup.focus();
}