// ----------Change Language of text on page -----------------
function ChangeLang(MyLang, myPage)
	{
x=myPage+"CL="+ MyLang;
document.location=x;
	}

function enLargeImage(theImage)
  {
  x="enlargeImage.asp?productID=" + theImage;
//alert('<%=Application(CL&"_please_close_enlarged_image_window")%>');
window.close('popup');
  window.open(x,'popup','height=450,width=400,top=50,left=100');
  }

  // -----------used to view products from list of catagories or sub catagories------------------
  //subCatagoryNum - the sub or catagory number
  // ENGsubCatagory - name of catagory in English
  // HEBsubCatagory - name of catagory in Hebrew
  // catOrSubCat - is it a catagory or sub catagory

function viewProducts(subCatagoryNum,ENGsubCatagory,HEBsubCatagory,catOrSubCat)
{
x="productsInSubCatagory.asp?subCatagoryNum="+ subCatagoryNum +"&ENGsubCatagory="+ ENGsubCatagory +"&HEBsubCatagory="+ HEBsubCatagory +"&catOrSubCat=" + catOrSubCat;
document.location=x;
}

function viewCatagory(catagoryNum,ENGcatagory,HEBcatagory)
{
x="catagory.asp?catagoryNum="+ catagoryNum +"&ENGcatagory="+ ENGcatagory +"&HEBcatagory="+ HEBcatagory;
document.location=x;
}


// open window for dash info
function openDashPopUp()
  {
  x="https://web2000.netvision.net.il/dash/dash.asp"
  window.open(x,'popup','height=450,width=400,top=50,left=100');
  }

// used in menu for search
function beforeSubmitSearch(theAlert)
{
        if (document.searchProduct.search.value=="")
        {
                alert (theAlert);
                document.searchProduct.search.focus();
        }
        else
        {
        document.searchProduct.submit();
        }
}

// //---- disable right button click

var message= "אתכם הסליחה פונקציה זו לא פעילה";
message += "\n\n";
message +="Sorry, that function is disabled. \n\n"
message += "This page is copyrighted, and ";
message += "all content is protected.";

function click(e) {
 if (document.all) {
 if (event.button == 2) {
   alert(message);
    return false;
   }
  }
  if (document.layers) {
   if (e.which == 3) {
      alert(message);
     return false;
    }
  }
}

if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;