
function addtocart(id, lang, el){
	el.src = '/img/wait.gif';
  
  $.ajax ({
   type: "GET",
   url: "/inc/handlers/cart.php",
   data: "add="+id+"&lang="+lang,
   success: function(ret) {
   
  
   
   if (ret) {
     el.src = '/img/ico-basket2.gif';
     $("#ok"+id).html('added!');
     
     
     $("#basketcontent").html(ret);
    
    } 
    // alert(ret);
    
    
    
    
   }
 });
}

function showhide(el) {
if ( $(el).css("display") == 'none')
    $(el).show(200);
else
    $(el).hide(200);
}


function showhidevis(el) {
	
if ($(el).css("visibility") == 'hidden')
		visibleState = true;
else
	visibleState = false;
	
	$(el).css("visibility",(visibleState ? "visible" : "hidden"));
}



function showhidevisandshutdown(el) {
lans = new Array("#ellada", "#eng", "#un", "#ua");

if ($(el).css("visibility") == 'hidden')
		visibleState = true;
else
	visibleState = false;
	
$(el).css("visibility",(visibleState ? "visible" : "hidden"));

for ($e = 0; $e < lans.length; $e++) {

	if (el != lans[$e])
		$(lans[$e]).css("visibility", "hidden");
	
}
}

function showhide_display_andshutdown(el) {
lans = new Array("#ellada", "#eng", "#un", "#ua", "#eu", "#cze", "#rom", "#aus", "#ita", "#am");

if ($(el).css("display") == 'none')
	$(el).show(1);
else
	$(el).hide(1);
	

for ($e = 0; $e < lans.length; $e++) {

	if (el != lans[$e])
		$(lans[$e]).css("display", "none");
	
}
}






var win = null;
function CenterWindow(mypage,myname,w,h,scroll) {
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
	win = window.open(mypage,myname,settings)
}

function close_wnd () {
window.opener.location.reload();
self.close();
return false;
}

