var active=0;
var close_flag;
var x=36, y=165;   
var width=202, height=127;	

function win_s(close_flag){ 	
								 


		 if(document.body.clientWidth)
		 {  
		  x=document.body.clientWidth-width;
		  }

		   document.getElementById("win_m").style.left=x+"px"; 
		   document.getElementById("win_m").style.top=y+"px";  
			 if(!active) 
			  {
			   document.getElementById("win_m").style.display="block"; 
			   active=1;
			   }
			   		else {
					document.getElementById("win_m").style.display="none"; 
					active=0;
					}

 
 				//document.getElementById("win_m").style.left=x+"px"; 
 				//document.getElementById("win_m").style.top=y+"px";  

 
 				 if(close_flag=="close") 
				  {
				   document.getElementById("win_m").style.display="none"; 
					 }

 }

 
 
 
 
 






switch(navigator.appName) {
	case "Microsoft Internet Explorer":
	document.onkeydown = GetKey;
	var Key = "event.shiftKey && event.keyCode == 65";
	break;
	case "Netscape":
	document.captureEvents(Event.KEYDOWN);
	document.onkeydown = GetKey;
	var Key = "(e.shiftKey && e.which == 65)";
	break;
	case "Opera":
	document.captureEvents(Event.KEYDOWN);
	document.onkeydown = GetKey;
	var Key = "(e.shiftKey && e.which == 65)";
	break;
}
 
function GetKey(e) {
	if (eval(Key)) {
win_s();		
//			alert( "Ты гавно!" );
		}	
}
		  


//shows navigator [prev] 1 2 3 4 … [next]
// исправляем баг сравнения товаров



function next_page(p)
{	
if(window.event) window.event.returnValue=false;
window.location = p+"&ComparisonHidden1="+document.ComparisonForm1.ComparisonHidden1.value;
}	   



	function open_window(link,w,h) //opens new window
	{
		var win = "width="+w+",height="+h+",menubar=no,location=no,resizable=yes,scrollbars=yes";
		newWin = window.open(link,'newWin',win);
		newWin.focus();
	}

	function open_printable_version(link) //opens new window
	{
		var win = "menubar=no,location=no,resizable=yes,scrollbars=yes";
		newWin = window.open(link,'perintableWin',win);
		newWin.focus();
	}

	function confirmDelete(id, ask, url) //confirm order delete
	{
		temp = window.confirm(ask);
		if (temp) //delete
		{
			window.location=url+id;
		}
	}
		  
	
	
	
	
	
	
	
	
