	//var currentFrame = "spFrame1";
	ScrollFreeze = /*2843293230303620532E4368616C6D657273*/
	{
		propFlag : true,
		Ydisp : 0,
		Xdisp : 0,
		
		on : function()
		{
			if(this.getProp())
			window.onscroll=function(){ ScrollFreeze.setXY();}
		},
		
		off : function()
		{
			window.onscroll=null;
		},
		
		getProp : function()
		{
			if( typeof window.pageYOffset != 'undefined' )
			{
				this.Ydisp=window.pageYOffset;
				this.Xdisp=window.pageXOffset;
			}
			else
				if(document.documentElement)
				{
					this.Ydisp=document.documentElement.scrollTop;
					this.Xdisp=document.documentElement.scrollLeft;
				}
				else
					if(document.body && typeof document.body.scrollTop != 'undefined')
					{
						this.Ydisp=document.body.scrollTop;
						this.Xdisp=document.body.scrollLeft;
					}
					else
						this.propFlag=false;
		
			return this.propFlag;
		},
		
		setXY : function()
		{
			window.scrollTo( this.Xdisp, this.Ydisp );
		}
	}

	/*function choosePoint(point)
	{
		document.getElementById('pointID').value = point;
		var divItem = document.getElementById('spFrame');
		var divWidth = parseInt(divItem.style.width);

		if( typeof( window.innerWidth ) == 'number' ) 
		{
			//Non-IE
			winWidth = window.innerWidth;
		} 
		else if(document.documentElement && ( document.documentElement.clientWidth ) ) 
		{
			//IE 6+ in 'standards compliant mode'
			winWidth = document.documentElement.clientWidth;
		} 
		else if( document.body && ( document.body.clientWidth ) )
		{
			//IE 4 compatible
			winWidth = document.body.clientWidth;
		}
		
		//divItem.style.display = 'block';
		//var frameItem = document.getElementById(spFrameItem);
		ScrollFreeze.on();
		var yoffSet = (navigator.appName=="Netscape")? window.pageYOffset : document.documentElement.scrollTop;
		divItem.style.left = (winWidth-divWidth)/2+'px';
		divItem.style.top = (yoffSet + 100)+'px';
		divItem.style.display = 'block';
		var bDiv = document.getElementById("blockingDiv");
		bDiv.className = 'block';
		bDiv.style.top = yoffSet+'px';
	}*/
	
	function checkForm()
	{
		var nickName = document.getElementById('nickName').value;
		var commentTxt = document.getElementById('commentTxt').value;
		if(commentTxt == "" || commentTxt == null)
		{
			alert("you didn't add any text");
			return false;
		}
		if(nickName == "" || nickName == null)
		{
			var conf = confirm("are you sure you don't want to add a name?");
			if(!conf)
				return false;
		}
		document.getElementById("commForm").submit();
		
	}
	function TAlimit(s) 
	{
		var maxlength = 1024; // Change number to your max length.
		if (s.value.length > maxlength) 
		s.value = s.value.substring(0,maxlength);
	}
	
	function displayDetails()
	{
		//document.getElementById(currentFrame).style.display = 'none';
		var frameItem = document.getElementById("spFrame1");
		
		winWidth = getWidth();
		winHeight = getHeight();
		
		var divWidth = 400;
		if(winHeight < 500)
		{
			divWidth = winHeight - 100;
		}
		frameItem.style.width = divWidth + 'px';
		
		ScrollFreeze.on();
		var yoffSet = (navigator.appName=="Netscape")? window.pageYOffset : document.documentElement.scrollTop;
		frameItem.style.left = (winWidth-divWidth)/2+'px';
		
		frameItem.style.top = (yoffSet + 20)+'px';
		
		frameItem.style.display = 'block';
		var bDiv = document.getElementById("blockingDiv");
		bDiv.className = 'block';
		bDiv.style.top = yoffSet+'px';
	}
	
	
	function closedetails()
	{
		ScrollFreeze.off();
		if(document.getElementById("spFrame1"))
			document.getElementById("spFrame1").style.display = 'none';
		if(document.getElementById("login_box"))
			document.getElementById("login_box").style.display = 'none';
		if(document.getElementById("reg_box"))
			document.getElementById("reg_box").style.display = 'none';
		if(document.getElementById("ret_box"))
			document.getElementById("ret_box").style.display = 'none';

		document.getElementById("blockingDiv").className = 'unblock';
	}
	
	function displayPic(itemCode, itemName, itemSize, txt, price)
	{
		var divObj = document.getElementById('spFrame1');
		var winWidth = getWidth();
		var winHeight = getHeight();
		var picHeight = "";
		
		if(winHeight < 500)
		{
			var h = winHeight - 180;
			picHeight = "height:"+h+"px;"
		}
		var pText = "&nbsp;";
		if(price > 0)
			pText = price + '&nbsp;&#8362;';
		
		divObj.innerHTML = "<br><img src='./images/"+itemCode+".jpg' style='border:0;"+picHeight+"' alt='"+itemCode+"'><br><br><p class='photoTxt'>"+itemName+'<span style="float:left">'+pText+'</span><br><i>'+itemSize+'</i><br>'+txt+'<span onclick="closedetails();" class="closeDiv">&nbsp;&times;&nbsp;</span>';
		
		displayDetails();
	}
	
	function getHeight()
	{
		var wh;
		if( typeof( window.innerWidth ) == 'number' ) 
		{
			//Non-IE
			wh = window.innerHeight;
		} 
		else if(document.documentElement && ( document.documentElement.clientHeight ) ) 
		{
			//IE 6+ in 'standards compliant mode'
			wh = document.documentElement.clientHeight;
		} 
		else if( document.body && ( document.body.clientHeight ) )
		{
			//IE 4 compatible
			wh = document.body.clientHeight;
		}
		return wh;
	}
	
	function getWidth()
	{
		var ww;
		if( typeof( window.innerWidth ) == 'number' ) 
		{
			//Non-IE
			ww = window.innerWidth;
		} 
		else if(document.documentElement && ( document.documentElement.clientWidth ) ) 
		{
			//IE 6+ in 'standards compliant mode'
			ww = document.documentElement.clientWidth;
		} 
		else if( document.body && ( document.body.clientWidth ) )
		{
			//IE 4 compatible
			ww = document.body.clientWidth;
		}
		return ww;
	}
 
	function displayLogin()
	{
		closedetails();
		var login_box = document.getElementById("login_box");
		
		winWidth = getWidth();
		winHeight = getHeight();
		
		var divWidth = 300;
		/*if(winHeight < 500)
		{
			divWidth = winHeight - 100;
		}*/
		login_box.style.width = divWidth + 'px';
		
		ScrollFreeze.on();
		var yoffSet = (navigator.appName=="Netscape")? window.pageYOffset : document.documentElement.scrollTop;
		login_box.style.left = (winWidth-divWidth)/2+'px';
		login_box.style.top = (yoffSet + 100)+'px';
		
		login_box.style.display = 'block';
		var bDiv = document.getElementById("blockingDiv");
		bDiv.className = 'block';
		bDiv.style.top = yoffSet+'px';
	}
	
	function displayRegister()
	{
		closedetails();
		var reg_box = document.getElementById("reg_box");
		
		winWidth = getWidth();
		winHeight = getHeight();
		
		var divWidth = 300;
		/*if(winHeight < 500)
		{
			divWidth = winHeight - 100;
		}*/
		reg_box.style.width = divWidth + 'px';
		
		ScrollFreeze.on();
		var yoffSet = (navigator.appName=="Netscape")? window.pageYOffset : document.documentElement.scrollTop;
		reg_box.style.left = (winWidth-divWidth)/2+'px';
		reg_box.style.top = (yoffSet + 100)+'px';
		
		reg_box.style.display = 'block';
		var bDiv = document.getElementById("blockingDiv");
		bDiv.className = 'block';
		bDiv.style.top = yoffSet+'px';
	}
	
	
	function check_password(str)
	{
		var passw = document.getElementById("pwd");
		if(passw == "" && str != "")
		{
			passw.style.borderColor = "red";
			return;
		}
		if(passw != "" && str == "")
		{
			document.getElementById("re_pwd").style.borderColor = "red";
			return;
		}
		if(str == passw.value)
		{
			passw.style.borderColor = "green";
			document.getElementById("re_pwd").style.borderColor = "green";
			
		}
		else
		{
			passw.style.borderColor = "red";
			document.getElementById("re_pwd").style.borderColor = "red";
		}
	}

	function checkRegForm()
	{
		var error = "";
		var shop = document.getElementById("shop_name");
		var username = document.getElementById("uname");
		var re_pwd = document.getElementById("re_pwd");
		var pawd = document.getElementById("pwd");
		var p_code = document.getElementById("phone_code");
		var shop_email = document.getElementById("email");
		//alert(shop.value);
		if(parseInt(shop.value) == 0)
		{
			error = "יש לבחור חנות ";
			shop.style.border = "solid 1px red";
		}
		else
			shop.style.border = "solid 1px green";
		
		if(!username.value)
		{
			error += "\n";
			error += "יש לבחור שם משתמש";
			username.style.borderColor = "red";
		}
		else
			username.style.borderColor = "green";
		
		if(pawd.value != re_pwd.value || !pawd.value)
		{
			error += "\n";
			error += "יש להכניס סיסמא ולהקלידה שוב. את הסיסמא יש לשמור במקום בטוח.";
			pawd.style.borderColor = "red";
			re_pwd.style.borderColor = "red";
		}
		else
		{
			pawd.style.borderColor = "green";
			re_pwd.style.borderColor = "green";
		}
		
		if(!echeck(shop_email.value))
		{
			error += "\n";
			error += "יש להכניס כתובת אימייל תקינה";
			shop_email.style.borderColor = "red";
		}
		else
			shop_email.style.borderColor = "green";
		
		if(!p_code.value)
		{
			error += "\n";
			error += "יש להכניס קוד טלפוני. את הקוד ניתן לקבל מטלי או הלה.";
			p_code.style.borderColor = "red";
		}
		else
			p_code.style.borderColor = "green";
		
		if(error!="")
			alert(error);
		else
			document.getElementById("regform").submit();
	}

function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    
		    return false
		 }

 		 return true					
	}

	function displayRetrive()
	{
		closedetails();
		var ret_box = document.getElementById("ret_box");
		
		winWidth = getWidth();
		winHeight = getHeight();
		
		var divWidth = 300;
		/*if(winHeight < 500)
		{
			divWidth = winHeight - 100;
		}*/
		ret_box.style.width = divWidth + 'px';
		
		ScrollFreeze.on();
		var yoffSet = (navigator.appName=="Netscape")? window.pageYOffset : document.documentElement.scrollTop;
		ret_box.style.left = (winWidth-divWidth)/2+'px';
		ret_box.style.top = (yoffSet + 100)+'px';
		
		ret_box.style.display = 'block';
		var bDiv = document.getElementById("blockingDiv");
		bDiv.className = 'block';
		bDiv.style.top = yoffSet+'px';
	}

	function retrivePassword()
	{
		closedetails();
		document.getElementById("retrive").submit();
	}

