var WinOpen;

function my_go (target){
	if(target!=undefined && target!="" && target!=0){
		location.href=target;
	}
}

function clean_basket(text,link){
	if (confirm(text)) {
		document.update_basket.submit();
	}
}

function show_img(title, img_src, img_width, img_height) {
 	height = parseInt(img_height) + 30;
 	width = parseInt(img_width) + 30;

	p_top=(screen.height-img_height)/2-30;
	p_left=(screen.width-img_width)/2-30;

    if(WinOpen != null){
     	  WinOpen.close();
          WinOpen  =  window.open("", "Foto", "closed=yes, toolbar=no, location=no, top="+p_top+", left="+p_left+", directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width="+width+", height="+height+"");
    }else{
          WinOpen  =  window.open("", "Foto", "closed=yes, toolbar=no, location=no, top="+p_top+", left="+p_left+", directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width="+width+", height="+height+"");
}
    if(WinOpen != null){
          WinOpen  =  window.open("", "Foto", "closed=yes, toolbar=no, location=no, top="+p_top+", left="+p_left+", directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width="+width+", height="+height+"");
          WinOpen.document.write("<html><head><title>"+title+"</title>");
          WinOpen.document.write("<SCRIPT language=javascript>function cl() { close(); }</SCRIPT></head>");
          WinOpen.document.write("<body style='padding:0; margin:0;' bgcolor='#E5E5E5'><table width='100%' height='100%'><tr><td align='center' style='vertical-align:middle;'><img src="+img_src+" style='cursor:pointer;' alt=\"Закрыть\" onClick=\"cl()\"; style='BORDER-RIGHT: white 4px solid; BORDER-TOP: white 4px solid; BORDER-LEFT: white 4px solid; BORDER-BOTTOM: white 4px solid'></td></tr></table></body></html>");
    }

return WinOpen;

}

function show_this_deactive_last(id){

		document.getElementById(document.getElementById("last_id").value).style.display="none";
		document.getElementById('last_id').value=id;
		document.getElementById(id).style.display="block";

}