
var i =1;
var ewew= 0;  
 
 

function writeFlash (flashID, flashMovie, width, height) {

	var t ="";
	t += '<object ';
	t += '	id="' + flashID + '"';
	t += '	classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
	t += '	codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" ';
	t += '	width="' + width + '" ';
	t += '	height="' + height + '">';
	t += '		<param name="movie" value="' + flashMovie + '">';
	t += '		<param name="wmode" value="transparent">';
	t += '		<embed wmode="transparent" src="' + flashMovie + '" ';
	t += '			name="' + flashID + '"';
	t += '			quality="high" ';
	t += '			pluginspage="http://www.macromedia.com/go/getflashplayer" ';
	t += '			type="application/x-shockwave-flash" ';
	t += '			width="' + width + '" ';
	t += '			height="' + height + '">';
	t += '		</embed>';
	t += '</object>';
	
	document.write (t);
}





function movepic(img_name,img_src) {
document[img_name].src=img_src;
}





<!-- START ONMOUSE OVER COLOR IN TABLE -->
 

var ns6=document.getElementById&&!document.all
var ie=document.all

function changeto(e,highlightcolor){
source=ie? event.srcElement : e.target
if (source.tagName=="TR"||source.tagName=="TABLE")
return
while(source.tagName!="TD"&&source.tagName!="HTML")
source=ns6? source.parentNode : source.parentElement
if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
source.style.backgroundColor=highlightcolor
}

function contains_ns6(master, slave) { //check if slave is contained by master
while (slave.parentNode)
if ((slave = slave.parentNode) == master)
return true;
return false;
}

function changeback(e,originalcolor){
if
(ie&&(event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")||source.tagName=="TR"||source.tagName=="TABLE")
return
else if (ns6&&(contains_ns6(source, e.relatedTarget)||source.id=="ignore"))
return
if (ie&&event.toElement!=source||ns6&&e.relatedTarget!=source)
source.style.backgroundColor=originalcolor
source.style.backgroundColor=originalcolor
}
<!-- END ONMOUSE OVER COLOR IN TABLE -->





var win = null;
function NewWindow(mypage,myname,w,h,scroll){

LeftPosition =  (screen.width/2)-(w/2);
TopPosition =  (screen.height/2)-(h/2);


settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}



<!------------------------------------ DHTML email validation script -------------------------->

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					
	}
<!------------------------------------ DHTML email validation script end -------------------------->




<!------------------------------------ onlyDigits -------------------------->
function onlyDigits(e) {
var _ret = true;
if (window.event.keyCode < 46 || window.event.keyCode > 57) {
window.event.keyCode = 0;
_ret = false;
}
return (_ret); 
}
<!------------------------------------ onlyDigits  end -------------------------->



function IsNumericCheck(sText)
{
   var ValidChars = "0123456789.";
   var IsNumber=true;
   var Char;

 
   for (i = 0; i < sText.length && IsNumber == true; i++) 
      { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
         {
         IsNumber = false;
         }
      }
   return IsNumber;
   
   }


   
   
   
   
   


function changestyleOver(current,location,id)
	{
   bgstr= 'url(images/MenuCategory/but0'+location+'_sug_down.png)';
  var itm = null;
		if (document.getElementById) {
			itm = document.getElementById(id);
		} else if (document.all){
			itm = document.all[id];
		} else if (document.layers){
			itm = document.layers[id];
		}
   itm.className='TitleTatMenuWhite';
   current.style.background=bgstr;

}

function changestyleOut(current,location,id)
	{
        var itm = null;
		if (document.getElementById) {
			itm = document.getElementById(id);
		} else if (document.all){
			itm = document.all[id];
		} else if (document.layers){
			itm = document.layers[id];
		}
   itm.className='TitleTatMenu';
 current.style.background="url(images/MenuCategory/b_sug_up.png)";
  
}










function OnMouseChangeStyle(current,id,bgstr,className)
	{
    
          var itf = null;
		if (document.getElementById) {
			itf = document.getElementById(current);
		} else if (document.all){
			itf = document.all[current];
		} else if (document.layers){
			itf = document.layers[current];
		}
    
  var itm = null;
		if (document.getElementById) {
			itm = document.getElementById(id);
		} else if (document.all){
			itm = document.all[id];
		} else if (document.layers){
			itm = document.layers[id];
		}
        
   
        
        
  
   itf.background=bgstr;
    itm.className=className;

    
    
    
}


function OnMouseChangeStyleTat(id,bgstr,className)
	{
    
    
  var itm = null;
		if (document.getElementById) {
			itm = document.getElementById(id);
		} else if (document.all){
			itm = document.all[id];
		} else if (document.layers){
			itm = document.layers[id];
		}
        
   
        
        
  
   itm.background=bgstr;
    itm.className=className;

    
    
    
}


function OnMouseChangeClassNameOnly(current,ClassName)
	{
alert(current.ClassName)
   current.ClassName=ClassName;
alert(current.ClassName)
}
function OnMouseChangeFromBorder(current)
	{
 
   current.style.border="0px black solid;";
 }





function OnMouseChangeToBorder(current)
	{

   current.style.border="2px black solid;";

}
function OnMouseChangeFromBorder(current)
	{
 
   current.style.border="0px black solid;";
 }



function OnMouseChange(id,imagesrc){

	var itm = null;
	var itf= null;
	
		if (document.getElementById) {
			itm = document.getElementById(id);
		} else if (document.all){
			itm = document.all[id];
		} else if (document.layers){
			itm = document.layers[id];
		}
	itm.src=imagesrc
}



function OnMouseTitle(id,className){

	var itm = null;

		if (document.getElementById) {
			itm = document.getElementById(id);
		} else if (document.all){
			itm = document.all[id];
		} else if (document.layers){
			itm = document.layers[id];
		}
        
       
	
	itm.className=className;
}

function ChangeClass(b,className){

	
       
	
	b.className=className;
}
// ------------------------------Login-------------------------------------------------
    
    
    
    
    <!-------------------- load to div---------------------->

function ahah(url, target) {
  document.getElementById(target).innerHTML = '';
 
  if (window.XMLHttpRequest) {
  
    req = new XMLHttpRequest();
  } else if (window.ActiveXObject) {
  
     
    req = new ActiveXObject("Msxml2.XMLHTTP");

  }
  

  if (req != undefined) {
    req.onreadystatechange = function() {ahahDone(url, target);};
    req.open("GET", url, true);
    req.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=iso-8859-8");
    req.send(null);
  }
}  


function ahahDone(url, target) {

  if (req.readyState == 4) { // only if req is "loaded"
  
    if (req.status == 200) { // only if "OK"
   //   alert(target)
     //       alert(document.getElementById(target).innerHTML)
          document.getElementById(target).innerHTML = req.responseText;
          
      //    alert(document.getElementById(target).innerHTML)
          
         
    } else {
      document.getElementById(target).innerHTML=" AHAH Error:\n"+ req.status + "\n" +req.statusText;
    }
  }
}



function load(name, div) {

  document.getElementById(div).innerHTML = "";
return	ahah(name,div);
}


function unload(name, div) {
 document.getElementById(div).innerHTML = "";
}

function loadunload(name, div) {
if (document.getElementById(div).innerHTML == "") { 
	ahah(name,div);
    }
else{
    document.getElementById(div).innerHTML = "";
   }
}


<!--------------------load to div end ------------------->







function HebDecode(str) { 
   var str2="";
   var ch;
   
  if(str!="")
  {
   for (j=0;j<str.length;j++)
        {
		ch=str.charCodeAt(j);
		if (str2=='')
		{str2=ch}
		else
		{str2=str2+','+ch}
		
		}
   return str2;
   }
 }
 

 

// ------------------------------Login-------------------------------------------------

function ClearUserName(UserNamePar){

 if (document.form.UserName.value==UserNamePar){
 
 document.form.UserName.value="";
 }
 
 
 }



function ClearPassword(PasswordPar){
//alert(document.form.Password.type)
 if (document.form.Password.value==PasswordPar){
 
 //document.form.Password.type="Password";
 document.form.Password.value="";
 }
 
 
 }

function CheckLogin(UserNamePar,PasswordPar){

 if (document.form.UserName.value=="" || document.form.UserName.value== UserNamePar ){
	window.alert("! נא להזין שם פרטי")
		document.form.UserName.focus();
		return false;
	}
 if (document.form.Password.value=="" || document.form.Password.value==PasswordPar){
		window.alert("! נא להזין סיסמה")
		document.form.Password.focus();
		return false;
	}
    
 document.form.submit();
  
  
  
    
	}
    
    
    function LoginOut(){

    
    document.form.submit();
    
	}


    function search(){
     document.form.action="Results.asp"
    
    document.form.submit();
    
	}


// ------------------------------Login end- ------------------------------------------------


    
    

    
    
    

function show(id)
	{
 
		var itm = null;
		if (document.getElementById) {
         
        
			itm = document.getElementById(id);
		} else if (document.all){
			itm = document.all[id];
		} else if (document.layers){
			itm = document.layers[id];
		}
		if (itm.style) {
        
       
        itm.style.display = ""; 
			
		}
        
       
        
	}

function hide_span(id)
	{
  
		var itm = null;
		if (document.getElementById) {
			itm = document.getElementById(id);
		} else if (document.all){
			itm = document.all[id];
		} else if (document.layers){
			itm = document.layers[id];
		}
		
    
            itm.style.display = "none"; 
	
            
	}
    
function Change(imgName) {


 PicDiv.innerHTML ="";
 t="";

  t +='<img  id="big" name="big" src="'+imgName+'"  border=0 >'
   PicDiv.innerHTML = t;
   
}


function ChangeVideo(location,width,height) {


 PicDiv.innerHTML ="";
 flashID="minisite";
 t="";
 flashMovie="admin/Product/uploads/Big/"+location;
 
  var t ="";
	t += '<object ';
	t += '	id="' + flashID + '"';
	t += '	classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
	t += '	codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" ';
	t += '	width="' + width + '" ';
	t += '	height="' + height + '">';
	t += '		<param name="movie" value="' + flashMovie + '">';
	t += '		<param name="wmode" value="transparent" quality="high">';
	t += '		<embed wmode="transparent" src="' + flashMovie + '" ';
	t += '			name="' + flashID + '"';
	t += '			quality="high" ';
	t += '			pluginspage="http://www.macromedia.com/go/getflashplayer" ';
	t += '			type="application/x-shockwave-flash" ';
	t += '			width="' + width + '" ';
	t += '			height="' + height + '">';
	t += '		</embed>';
	t += '</object>';
	
     PicDiv.innerHTML = t;
   
}



function ChangeIndexFlash(productid)
	{
    var itm = null;
  // alert('productid='+productid)
     id="indexFlash";
	  srcpath =	"Admin/Product/uploads/flash_"+productid+"/index.asp?productid="+productid;
      
      	var itm = null;
		if (document.getElementById) {
			itm = document.getElementById(id);
		} else if (document.all){
			itm = document.all[id];
		} else if (document.layers){
			itm = document.layers[id];
		}
        
   //   alert(itm)  
    //    alert(itm.src)
        
            itm.src=srcpath
	}




     function CheckContact(location) {
    //  alert(location)
              if (document.form.FirstName.value == "") {
                  window.alert("! נא להזין שם פרטי")
                  document.form.FirstName.focus();
                  return false;
              }

              if(location=="Kablanim")
                 {


                                if (document.form.CompanyName.value == "") {
                                 window.alert("! נא להזין שם חברה")
                                  document.form.CompanyName.focus();
                                   return false;
                                    }

                  }
 
                  else{



                       if (document.form.LastName.value == "") {
                                 window.alert("! נא להזין שם משפחה")
                                  document.form.LastName.focus();
                                   return false;
                                    }
                  }



              if (document.form.Telephone.value == "") {
                  window.alert("! נא להזין מספר טלפון להתקשרות")
                  document.form.Telephone.focus();
                  return false;
              }

              if (document.form.Telephone.value != "") {
                  if (document.form.Telephone.value.length < 9) {
                      window.alert("מספר הטלפון אינו תקין");
                      document.form.Telephone.focus();
                      return false;
                  }


                  for (j = 0; j < document.form.Telephone.value.length; j++) {
                      checkNum = true
                      strChar = document.form.Telephone.value.charAt(j);

                      checkQ = parseInt(strChar)

                      if (isNaN(checkQ)) {
                          checkNum = false
                      }
                  }

                  if (checkNum == false) {
                      alert("! נא להזין מספר טלפון בספרות בלבד")
                      document.form.Telephone.focus();
                      return false
                  }

              }

//              if (document.form.email.value==""){
//		             window.alert("! נא להזין דואר אלקטרוני")
//		              document.form.email.focus();
//		            return false;
//	           }
//	
//             if ( document.form.email.value!="" && document.form.email.value.indexOf('@')==-1){
//		            window.alert(".כתובת הדואר האלקטרוני שגויה");
//		            document.form.email.focus();
//		              return false
//		         }
//	

                 if(location!="Kablanim")
                 {


                                if (document.form.Branch.value == "") {
                                 window.alert("! נא להזין סניף")
                                  document.form.Branch.focus();
                                   return false;
                                    }

                  }
                
            if(location=="ContactArchitects" && document.form.RegisteredArchitectNot.checked)  
               {
                document.form.action="DoSendContact.asp?LocationContact="+location+"&RegisteredArchitect=not";
               } 

             if(location=="ContactArchitects" && document.form.RegisteredArchitectYes.checked)  
               {
                document.form.action="DoSendContact.asp?LocationContact="+location+"&RegisteredArchitect=yes";
               } 


                 if(location=="ContactArchitects" &&  document.form.RegisteredArchitectNot.checked==false &&  document.form.RegisteredArchitectYes.checked== false)  
               {
                document.form.action="DoSendContact.asp?LocationContact="+location+"&RegisteredArchitect=not";
               } 

                if(location!="ContactArchitects" )  
               {
               document.form.action="DoSendContact.asp?LocationContact="+location;
               }
              document.form.submit();

          }


          function CleanContact() {
              document.form.reset();
          }



                function gotoSnif(b) {
              document.location.href="Snifs.asp?BranchID="+b.value;
          }

