
var State;


	

function sendtofriend()
	{
	
	var url;
	url="/sendtofriend.aspx?utlLocation=" + window.location.href;
	window.location=url;
	
	}
	

function sendtofriendGlobalSearch (sParam)
	{	 	 
	
	var url;
	url="sendtofriend.aspx?utlLocation=http://www.israelidiamond.co.il/searchResultsGlobal.aspx?searchStr=" + sParam; 
	window.location=url;
	
	}

function ChangeImg(N_Img){
 
 
   var myImg = N_Img;  
   var divName;
   //   alert(N_Img);
   var N_Img=document.getElementById(N_Img); 
 //   alert(N_Img);
//alert(Img.src.indexOf("_current"));
   if(N_Img!=null && N_Img.src.indexOf("_current")<1 ){
   
    if (N_Img.src.indexOf("_off")>-1)
    {   
     N_Img.src=N_Img.src.replace("_off","_on");  
     if (document.getElementById(N_Img.id+ "_Div")!=null)	 
		 document.getElementById(N_Img.id+ "_Div").style["display"]="block";
    }
    else {      
	     N_Img.src=N_Img.src.replace("_on","_off");
		 if (document.getElementById(N_Img.id+ "_Div")!=null)	 
			document.getElementById(N_Img.id+ "_Div").style["display"]="none";
    }   
   } 
}




 function CloseTozaaDiv(objNameId)
 {
   var objName="vr" +objNameId;
  var N_Div=document.getElementById(objName);
   
  var N_img 
  var N_Div2=objName+"A";
  
  if (N_Div.style["display"]=="none")
  {
   
	N_Div.style["display"]="block"; 
	document.getElementById(N_Div2).style["display"]="none";
	
	N_img=document.getElementById("imgOpen"+objNameId);	 
	  
	if (N_img!=null)
	{	 	  
	N_img.src="images/icons/minus.gif";	  	  
	}
	
  }
else
  {
	N_Div.style["display"]="none";
	document.getElementById(N_Div2).style["display"]="block";
	
	N_img=document.getElementById("imgOpen" +objNameId);	  
	if (N_img!=null)
	{	 	  
	N_img.src="images/icons/i_plus.gif";	  	  
	}
	
  }
  
 }
 
 function CloseTozaaDiv(objNameId)
 {
   var objName="vr" +objNameId;
  var N_Div=document.getElementById(objName);
   //alert(objName)
   // alert(N_Div);
  var N_img 
  var N_Div2=objName+"A";
  
  if (N_Div.style["display"]=="none")
  {
   
	N_Div.style["display"]="block"; 
	document.getElementById(N_Div2).style["display"]="none";
	
	N_img=document.getElementById("imgOpen"+objNameId);	 
	  
	if (N_img!=null)
	{	 	  
	N_img.src="images/icons/minus.gif";	  	  
	}
	
  }
else
  {
	N_Div.style["display"]="none";
	document.getElementById(N_Div2).style["display"]="block";
	
	N_img=document.getElementById("imgOpen" +objNameId);	  
	if (N_img!=null)
	{	 	  
	N_img.src="images/icons/i_plus.gif";	  	  
	}
	
  }
  
 }
 
 function CloseDiv(objName)
 {
  var N_Div=document.getElementById(objName);
  if (N_Div.style["display"]=="none")
	N_Div.style["display"]="block";
else
	N_Div.style["display"]="none";
  
 }
function CloseImg(N_Img)
{ 
	var myImg = N_Img;  
    var N_Img=document.getElementById(N_Img); 
 
   if(N_Img!=null && N_Img.src.indexOf("_current")<1){          
     N_Img.src=N_Img.src.replace("_on","_off");       
     if (document.getElementById(N_Img.id+ "_Div")!=null)	
		document.getElementById(N_Img.id+ "_Div").style["display"]="none";
   } 
}


var MyDisplayed = new Object();
MyDisplayed.id="";

function reminder(id)
{
alert(id);
if (MyDisplayed.id!="") {MyDisplayed.style.display="none";}
var My = eval("document.all.vr"+id);
if (My!=MyDisplayed)
	{
		MyDisplayed=My;
		My.style.display="inline";
	}
else {
	MyDisplayed= new Object();
	MyDisplayed.id="";
	}
}	

function ResizeMe(cX, cY) {
	var x = parseInt("0" + cX, 10), y = parseInt("0" + cY, 10);
	if (x>0 && y>0) {
		window.resizeTo(x, y);
	}
}

