
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" 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>';
	
	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;
   
   }


   
   
   
   //11111111111111111111111 server 11111111111111111111111111
   
   
   
//11111111111111111111111 server end 11111111111111111111111111111111111
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   

function CheckContact(Alert1,Alert2,Alert3){

 if (document.form.FullName.value==""){
		window.alert(Alert1)
		document.form.FullName.focus();
		return false;
	}

	


 if (document.form.email.value==""){
		window.alert(Alert2)
		document.form.email.focus();
		return false;
	}
	
if ( document.form.email.value!="" && echeck(document.form.email.value)==false){
		window.alert(Alert3);
		document.form.email.focus();
		return false
		}
	
    

 document.form.action="DoSendContact.asp"
	document.form.submit()	
}   



function CleanContact(){
document.form.reset();
}




    
    

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 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 OnMouseBackGround(id,bgstr){

	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('backgroundImage='+itm.style.backgroundImage)
    itm.style.backgroundImage =bgstr; 
   // alert(itm.background)   
   
}
// ------------------------------Login-------------------------------------------------

function ClearUserName(UserNamePar){

 if (document.form.UserNameLogin.value==UserNamePar){
 
 document.form.UserNameLogin.value="";
 }
 
 
 }



function ClearPassword(PasswordPar){
//alert(document.form.Password.type)
 if (document.form.PasswordLogin.value==PasswordPar){
 
 //document.form.Password.type="Password";
 document.form.PasswordLogin.value="";
 }
 
 
 }

function Login(UserNamePar,PasswordPar,Alert1,Alert2){

 if (document.form.UserNameLogin.value=="" || document.form.UserNameLogin.value==UserNamePar  ){
		window.alert(Alert1)
		document.form.UserNameLogin.focus();
		return false;
	}
 if (document.form.PasswordLogin.value=="" || document.form.PasswordLogin.value==PasswordPar){
		window.alert(Alert2)
		document.form.PasswordLogin.focus();
		return false;
	}
    document.form.action="login.asp"  
   document.form.submit();
    return true;
	}
    

// ------------------------------Login end- ------------------------------------------------


    
    
function LoginOut(){

document.form.action="login.asp?LogOut=yes"  
 document.form.submit();
    return true;
	}
    
    
    
    
    
    
    
    
    
    // ------------------------------Login Exist -------------------------------------------------

function ClearUserNameExist(UserNamePar){

 if (document.form.UserNameExist.value==UserNamePar){
 
 document.form.UserNameExist.value="";
 }
 
 
 }



function ClearPasswordExist(PasswordPar){

 if (document.form.PasswordExist.value==PasswordPar){
 
 document.form.PasswordExist.value="";
 }
 
 
 }

function LoginExist(UserNamePar,PasswordPar,Alert1,Alert2){

 if (document.form.UserNameExist.value=="" || document.form.UserNameExist.value==UserNamePar  ){
		window.alert(Alert1)
		document.form.UserNameExist.focus();
		return false;
	}
 if (document.form.PasswordExist.value=="" || document.form.PasswordExist.value==PasswordPar){
		window.alert(Alert2)
		document.form.PasswordExist.focus();
		return false;
	}
    
    document.form.action="checkout.asp"  
   document.form.submit();
    return true;
    
	}
    

// ------------------------------Login end- ------------------------------------------------

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    <!-------------------- 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=windows-1255");
    req.send(null);
  }
}  


function ahahDone(url, target) {

  if (req.readyState == 4) { // only if req is "loaded"
  
    if (req.status == 200) { // only if "OK"
          document.getElementById(target).innerHTML = req.responseText;
         
    } else {
      document.getElementById(target).innerHTML=" AHAH Error:\n"+ req.status + "\n" +req.statusText;
    }
  }
}



function load(name, div) {
return	ahah(name,div);
}




function loadunload(name, div) {
if (document.getElementById(div).innerHTML == "") { 
	ahah(name,div);
    }
else{
    document.getElementById(div).innerHTML = "";
   }
}


<!--------------------load to div end ------------------->





<!----------------------------- dynamic contest product --------------->




function movedownproduct(){

if (iens6){

var crossobj=document.getElementById? document.getElementById("contentproduct") : document.all.contentproduct
var contentheight=crossobj.offsetHeight
}
else if (ns4){
var crossobj=document.nscontainer.document.nscontentproduct
var contentheight=crossobj.clip.height
}
if (iens6&&parseInt(crossobj.style.top)>=(contentheight*(-1)+100))
crossobj.style.top=parseInt(crossobj.style.top)-speed+"px"
else if (ns4&&crossobj.top>=(contentheight*(-1)+100))
crossobj.top-=speed
movedownvar=setTimeout("movedownproduct()",20)
}

function moveupproduct(){

if (iens6){

var crossobj=document.getElementById? document.getElementById("contentproduct") : document.all.contentproduct
var contentheight=crossobj.offsetHeight
}
else if (ns4){
var crossobj=document.nscontainer.document.nscontentproduct
var contentheight=crossobj.clip.height
}
if (iens6&&parseInt(crossobj.style.top)<=0)
crossobj.style.top=parseInt(crossobj.style.top)+speed+"px"
else if (ns4&&crossobj.top<=0)
crossobj.top+=speed
moveupvar=setTimeout("moveupproduct()",20)

}


<!----------------------------- dynamic contest product end --------------->

<!----------------------------- dynamic contest news --------------->




function movedownnews(){

if (iens6){

var crossobj=document.getElementById? document.getElementById("contentnews") : document.all.contentnews
var contentheight=crossobj.offsetHeight
}
else if (ns4){
var crossobj=document.nscontainer.document.nscontentnews
var contentheight=crossobj.clip.height
}
if (iens6&&parseInt(crossobj.style.top)>=(contentheight*(-1)+100))
crossobj.style.top=parseInt(crossobj.style.top)-speed+"px"
else if (ns4&&crossobj.top>=(contentheight*(-1)+100))
crossobj.top-=speed
movedownvar=setTimeout("movedownnews()",20)
}

function moveupnews(){

if (iens6){

var crossobj=document.getElementById? document.getElementById("contentnews") : document.all.contentnews
var contentheight=crossobj.offsetHeight
}
else if (ns4){
var crossobj=document.nscontainer.document.nscontentnews
var contentheight=crossobj.clip.height
}


if (iens6&&parseInt(crossobj.style.top)<=0)
crossobj.style.top=parseInt(crossobj.style.top)+speed+"px"
else if (ns4&&crossobj.top<=0)
crossobj.top+=speed
moveupvar=setTimeout("moveupnews()",20)

}



<!----------------------------- dynamic contest news end --------------->



<!------------------------------------ basket -------------------------->

function MinusQuan(productId,price,points,weight)
{

minquan=0
var prefixProductQuantity="ProductQuantity"+productId
var prefixTotalProductprice="TotalProductprice"+productId

var prefixTotalProductPointsNo="TotalProductPointsNo"+productId
var prefixTotalProductWeight="TotalProductWeight"+productId
var currentQuan=0

for (i=0; i<document.form.elements.length; i++) {
    element = document.form.elements[i];
    if (element.name == prefixProductQuantity)
	    {
      	currentQuan=element.value-1
		if (currentQuan<minquan){
		
		window.alert("Please, insert value>="+minquan)
		return false;
		  }
		  else
		element.value=currentQuan
	     }
  	}

	
	for (i=0; i<document.form.elements.length; i++) {
    element = document.form.elements[i];
    if (element.name == prefixTotalProductprice) {
      
		TotalProductprice=parseFloat(currentQuan*price)
          element.value=Math.round(TotalProductprice*100)/100;
		element.style.width=parseFloat(element.value.length*7)
      totalOrderPrice = parseFloat(document.form.totalOrderPrice.value-price)
        document.form.totalOrderPrice.value=Math.round(totalOrderPrice*100)/100;
		 document.form.totalOrderPrice.style.width=parseFloat( document.form.totalOrderPrice.value.length*8)
			}
      if (element.name == prefixTotalProductPointsNo) {        
            element.value=parseFloat(currentQuan*points)
            element.style.width=parseFloat(element.value.length*7)
		         document.form.totalOrderPointsNo.value=parseFloat(document.form.totalOrderPointsNo.value-points)
              document.form.totalOrderPointsNo.style.width=parseFloat( document.form.totalOrderPointsNo.value.length*8)
		    }
            
          
            
             if (element.name == prefixTotalProductWeight) { 
               OrderWeight=parseFloat(currentQuan*weight)
                 element.value=Math.round(OrderWeight*100)/100;
                element.style.width=parseFloat(element.value.length*7)
                 totalOrderWeight=  parseFloat(document.form.totalOrderWeight.value-weight)
		         document.form.totalOrderWeight.value=Math.round(totalOrderWeight*100)/100;
                document.form.totalOrderWeight.style.width=parseFloat( document.form.totalOrderWeight.value.length*8)
		 
            }   
  	}

   
	
	

	}

function PlusQuan(productId,price,points,weight)
{
var prefixProductQuantity="ProductQuantity"+productId
var prefixTotalProductprice="TotalProductprice"+productId
var prefixTotalProductPointsNo="TotalProductPointsNo"+productId
var prefixTotalProductWeight="TotalProductWeight"+productId
var currentQuan=0

for (i=0; i<document.form.elements.length; i++) {
    element = document.form.elements[i];
    if (element.name == prefixProductQuantity)
	    {
        currentQuan= element.value
		currentQuan++
		element.value=currentQuan
	     }
  	}

	
	for (i=0; i<document.form.elements.length; i++) {
    element = document.form.elements[i];
    if (element.name == prefixTotalProductprice) {
      
		TotalProductprice=parseFloat(currentQuan*price)
           element.value=Math.round(TotalProductprice*100)/100;
        element.style.width=parseFloat(element.value.length*7)
        
        totalOrderPrice=parseFloat(document.form.totalOrderPrice.value)+parseFloat(price)
		 document.form.totalOrderPrice.value=Math.round(totalOrderPrice*100)/100;
         document.form.totalOrderPrice.style.width=parseFloat( document.form.totalOrderPrice.value.length*8)
		 
		
		}
         if (element.name == prefixTotalProductPointsNo) {        
            element.value=parseFloat(currentQuan*points)
            element.style.width=parseFloat(element.value.length*7)
		   document.form.totalOrderPointsNo.value=parseFloat(document.form.totalOrderPointsNo.value)+parseFloat(points)
            document.form.totalOrderPointsNo.style.width=parseFloat( document.form.totalOrderPointsNo.value.length*8)
		 
            }
            
           if (element.name == prefixTotalProductWeight) { 
           OrderWeight=parseFloat(currentQuan*weight)
            element.value=Math.round(OrderWeight*100)/100;
            element.style.width=parseFloat(element.value.length*7)
            
             totalOrderWeight=parseFloat(document.form.totalOrderWeight.value)+parseFloat(weight)
		     document.form.totalOrderWeight.value=Math.round(totalOrderWeight*100)/100;
              document.form.totalOrderWeight.style.width=parseFloat( document.form.totalOrderWeight.value.length*8)
		 
            }   
  	}


	   
}	





function ChangeQuan(productId,price,points,weight)
{

minquan=0
var prefixProductQuantity="ProductQuantity"+productId

var prefixTotalProductpriceAll="TotalProductprice"
var prefixTotalProductprice="TotalProductprice"+productId

var prefixtotalProductPointsNoAll="TotalProductPointsNo"
var prefixTotalProductPointsNo="TotalProductPointsNo"+productId

var  prefixTotalProductWeightAll="TotalProductWeight"
var prefixTotalProductWeight="TotalProductWeight"+productId



var currentQuan=0
var totalOrderPrice=0
var totalOrderPointsNo=0
var totalOrderWeight=0
for (i=0; i<document.form.elements.length; i++) {
    element = document.form.elements[i];
    if (element.name == prefixProductQuantity)
	    {
      	currentQuan=element.value
		}
  	}
for (i=0; i<document.form.elements.length; i++) {
    element = document.form.elements[i];
    if (element.name == prefixTotalProductprice) {
      
		TotalProductprice=parseFloat(currentQuan*price)
         element.value=Math.round(TotalProductprice*100)/100;
		element.style.width=parseFloat(element.value.length*7)
    	}
        
         if (element.name == prefixTotalProductPointsNo) {
      
		element.value=parseFloat(currentQuan*points)
		element.style.width=parseFloat(element.value.length*7)
    	}
        if (element.name == prefixTotalProductWeight) {
        OrderWeight=parseFloat(currentQuan*weight)
        element.value=Math.round(OrderWeight*100)/100;
		
		element.style.width=parseFloat(element.value.length*7)
    	}
        
  	}


for (i=0; i<document.form.elements.length; i++) {
    element = document.form.elements[i];
    if (element.name.substring(0,17) == prefixTotalProductpriceAll) {
	
     	  totalOrderPrice =parseFloat(totalOrderPrice)+parseFloat(element.value) 
          totalOrderPrice=Math.round(totalOrderPrice*100)/100;
        
	 	}
     if (element.name.substring(0,20) == prefixtotalProductPointsNoAll) {
	 	  totalOrderPointsNo =parseFloat(totalOrderPointsNo)+parseFloat(element.value) 
        
	 	}
         
        if (element.name.substring(0,18) == prefixTotalProductWeightAll) {
        
       
        
	 	  totalOrderWeight =parseFloat(totalOrderWeight)+parseFloat(element.value) 
          totalOrderWeight=Math.round(totalOrderWeight*100)/100;
        
	 	}
           
  	}

   
 
 	        document.form.totalOrderPrice.value=totalOrderPrice
            document.form.totalOrderPrice.style.width=parseFloat( document.form.totalOrderPrice.value.length*8)
		 
            
      
		   
}

function SelectedPoints()
{


prefix_Master_totalOrderPrice_shipping= "Master_totalOrderPrice_shipping"
prefixtotalOrderMainPrice_shipping="totalOrderMainPrice_shipping"
 client_points_count= document.submitorder.client_points_count.value
 totalOrderPriceMaster= document.submitorder.totalOrderPriceMaster.value
 OrderPriceTottallyMaster= document.submitorder.OrderPriceTottallyMaster.value
 totalOrderPrice=parseFloat(totalOrderPriceMaster-client_points_count)

 
  document.submitorder.totalOrderPrice.value=Math.round(totalOrderPrice*100)/100;
 OrderPriceTottally=parseFloat(OrderPriceTottallyMaster-client_points_count)
    document.submitorder.OrderPriceTottally.value=Math.round(OrderPriceTottally*100)/100;
   
 
    DiffOrderPriceTottallyMaster= document.submitorder.DiffOrderPriceTottallyMaster.value
    DiffOrderTottally=parseFloat(DiffOrderPriceTottallyMaster)+parseFloat(client_points_count)
    document.submitorder.DiffOrderPriceTottally.value=Math.round(DiffOrderTottally*100)/100;
   document.submitorder.DiffOrderPriceTottally.style.width=parseFloat( document.submitorder.DiffOrderPriceTottally.value.length*10)
   
  
   for (i=0; i<document.submitorder.elements.length; i++) {
    element = document.submitorder.elements[i];
     
   
     if (element.name.substring(0,31) == prefix_Master_totalOrderPrice_shipping) {
	   
         points_value =element.value
     	  points_count =eval(points_value-client_points_count)
         
     	}
  
    
        
   if (element.name.substring(0,28) == prefixtotalOrderMainPrice_shipping) {
	
     	  element.value =points_count
      }
      }
  
  
}



function SelectedPointsMinPrice()
{



 client_points_count= document.submitorder.client_points_count.value
 totalOrderPriceMaster= document.submitorder.totalOrderPriceMaster.value
 
 totalOrderPrice=parseFloat(totalOrderPriceMaster-client_points_count)

  document.submitorder.totalOrderPrice.value=Math.round(totalOrderPrice*100)/100;
  OrderPriceTottally=parseFloat(totalOrderPriceMaster-client_points_count)
   document.submitorder.OrderPriceTottally.value=Math.round(OrderPriceTottally*100)/100;
   
  DiffOrderPriceTottallyMaster= document.submitorder.DiffOrderPriceTottallyMaster.value
    DiffOrderTottally=parseFloat(DiffOrderPriceTottallyMaster)+parseFloat(client_points_count)
    document.submitorder.DiffOrderPriceTottally.value=Math.round(DiffOrderTottally*100)/100;
     document.submitorder.DiffOrderPriceTottally.style.width=parseFloat( document.submitorder.DiffOrderPriceTottally.value.length*10)
   
  
}


function SetShipping(id,j){
shippingname="totalOrderMainPrice_shipping_"+id
	 Mastershippingname="Master_totalOrderPrice_shipping_"+id	
       
        if (document.getElementByName) {
			shippingnameObj = document.getElementByName(shippingname);
		} else if (document.all){
			shippingnameObj = document.all[shippingname];
		} else if (document.layers){
			shippingnameObj = document.layers[shippingname];
		}
         	 shipping=shippingnameObj.value;
        
        
         if (document.getElementByName) {
			MastershippingnameObj = document.getElementByName(Mastershippingname);
		} else if (document.all){
			MastershippingnameObj = document.all[Mastershippingname];
		} else if (document.layers){
			MastershippingnameObj = document.layers[Mastershippingname];
		}
         	 Mastershipping=MastershippingnameObj.value;
         
         
         
         
document.submitorder.OrderPriceTottally.value=Math.round(shipping*100)/100;
document.submitorder.OrderPriceTottallyMaster.value=Math.round(Mastershipping*100)/100;

 document.submitorder.OrderPriceTottally.style.width=parseFloat(document.submitorder.OrderPriceTottally.value.length*10)

}


function DeleteItem(num,id,totalproductprice)
{
//	alert('here')
	 var  quantityname="ProductQuantity"+id;
	 var QuantityItems_div="QuantityItems_div"
	 var totalOrderPrice_div="totalOrderPriceDiv"
    
    for (i=0; i<document.form.elements.length; i++) {
    element = document.form.elements[i];
    if (element.name == QuantityItems_div)
	    {
	   QuantityItems= element.value
         }
    if (element.name == quantityname)
	    {
	   quantity= element.value
         }
  	}
  	
  	
 
// alert('QuantityItems='+QuantityItems)
      
 // alert('quantity='+quantity)  
  
     for (i=0; i<document.form.elements.length; i++) {
    element = document.form.elements[i];
    if (element.name == QuantityItems_div)
	    {
	   QuantityItemsObj=parseFloat(QuantityItems-quantity)
	   element.value= QuantityItemsObj
         }
   if (element.name == totalOrderPrice_div)
	    {
	   element.value=parseFloat(element.value-totalproductprice)
         }
  	}
  	
  	  var location_str="Basket_inc.asp?number="+num+"&delupdate=delete&QuantityItems="+QuantityItemsObj;
    load(location_str,'centralpart');
  
}

function DeleteAll()
{
   var location_str="Basket_inc.asp?delupdate=delal";
    load(location_str,'centralpart');
   

}


function SendBasket()
{
document.form.action="checkout.asp";	
document.form.submit();

}



function KeepBasket(down)
{
ProductQuantity_Str="";
Product_Id_Str=document.form.Product_Id_Str.value;

var QuantityItems=0

Product_Id_arr=Product_Id_Str.split(',');
for (i=0;i<Product_Id_arr.length;i++)
        {
        quantityname="ProductQuantity"+Product_Id_arr[i]
       
     //  alert(quantityname)
        for (j=0; j<document.form.elements.length; j++) {
             element = document.form.elements[j];
             if (element.name == quantityname)
	             {
	             QuantityItemsValue= element.value
                  }
    
           	}
      //  alert('QuantityItemsValue='+QuantityItemsValue)
     //   alert('ProductQuantity_Str='+ProductQuantity_Str)
        
        
        
        if(ProductQuantity_Str==""){
        ProductQuantity_Str=QuantityItemsValue
        }
        else{
         ProductQuantity_Str=ProductQuantity_Str+","+QuantityItemsValue
        }
     // alert('ProductQuantity_Str2='+ProductQuantity_Str)
        QuantityItems=parseFloat(QuantityItems)+parseFloat(QuantityItemsValue)
     
	}
	
	
	
	 var QuantityItems_div="QuantityItems_div"
	 var totalOrderPrice_div="totalOrderPriceDiv"
 
    for (z=0; z<document.form.elements.length; z++) {
         element = document.form.elements[z];
         if (element.name == QuantityItems_div)
	        {
	         element.value= QuantityItems
             }
         if (element.name == totalOrderPrice_div)
	         {
	          element.value=document.form.totalOrderPrice.value;
              }
  	}
 
 
 
    
if (down=='yes')
{
 var location_str="Basket_inc.asp?keep=yes&Product_Id_Str="+Product_Id_Str+"&ProductQuantity_Str="+ProductQuantity_Str+"&QuantityItems="+QuantityItems;


 // alert(location_str)
document.form.str_test.value  =location_str;
 load(location_str,'centralpart');
}
}


<!----------------------------- basket 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;
   }
 }
 

 
  <!-------------------- Ajax  ---------------------->

function Ajax(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() {
    
    
    };
    req.open("GET", url, true);
    req.send(null);
  }
}  




  <!-------------------- Ajax  end ---------------------->

function OpenCloseDivs(target1, target2) {

document.getElementById(target1).style.display='none';
document.getElementById(target2).style.display='block';

}


function OpenDiv(target1) {
document.getElementById(target1).style.display='block';
}

function CloseDiv(target1) {
document.getElementById(target1).style.display='none';
}



  <!--------------------  search drivers ---------------------->
  
  
  function SelectTypeProduct(b,from)
	{
	 var xmlDoc
  var xslDoc
  var Product_Type=b.form.Product_Type.value;
  xmlDoc = new ActiveXObject('Microsoft.XMLDOM')
  xmlDoc.async = false;

  xslDoc = new ActiveXObject('Microsoft.XMLDOM')
  xslDoc.async = false;
  
 xmlDoc.load("admin/Scripts/ProductTypeselect/Product_SubTypeselect.asp?from="+from+"&Product_Type="+Product_Type)
   xslDoc.load("admin/Scripts/ProductTypeselect/Product_SubTypeIndexUser.xsl")

  Product_SubType.innerHTML = xmlDoc.documentElement.transformNode(xslDoc)
  
  	}
    
    
function SelectSubTypeProduct(b,from)
	{
	 var xmlDoc
  var xslDoc
  var Product_Type=b.form.Product_Type.value;
  
  xmlDoc = new ActiveXObject('Microsoft.XMLDOM')
  xmlDoc.async = false;

  xslDoc = new ActiveXObject('Microsoft.XMLDOM')
  xslDoc.async = false;
 
 xmlDoc.load("admin/Scripts/ProductSubTypeselect/Product_selectUtf8.asp?Product_Type="+Product_Type)
   xslDoc.load("admin/Scripts/ProductSubTypeselect/Product_IndexUser.xsl")

  Product_div.innerHTML = xmlDoc.documentElement.transformNode(xslDoc)
  
  	}
  
    
    
    function SearchDrivers(){   

     if (document.form.Driver_Title.value!="")     {
     var Driver_Title=HebDecode(document.form.Driver_Title.value);
     }
     else{
    var  Driver_Title="";
     }
     
     
   
     var Product_Type=document.form.Product_Type.value;
     var ProductID=document.form.ProductID.value;
     
    str="?Driver_Title="+Driver_Title
    str=str+"&Product_Type="+Product_Type
     str=str+"&ProductID="+ProductID
     str=str+"&search=yes"
     var location_str="Content_Drivers_inc.asp"+str;

      load(location_str,'centralpart');
  }
    
    
    
    <!--------------------  search drivers end ---------------------->
    
    
    
      <!-------------------- load to div---------------------->

function ahah(url, target) {
  document.getElementById(target).innerHTML = '';
   document.getElementById(target).innerHTML='<div id="loading" valign=top align=center><img align="absmiddle" src="images/animated_loading11.gif"  border=0 alt="">&nbsp;...</div>'
       
  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=windows-1255");
    req.send(null);
  }
}  


function ahahDone(url, target) {

  if (req.readyState == 4) { // only if req is "loaded"
  
    if (req.status == 200) { // only if "OK"
           document.getElementById(target).innerHTML = req.responseText;
         
    } else {
      document.getElementById(target).innerHTML=" AHAH Error:\n"+ req.status + "\n" +req.statusText;
    }
  }
}



function load(name, div) {

return	ahah(name,div);
}




function loadunload(name, div) {
if (document.getElementById(div).innerHTML == "") { 
	ahah(name,div);
    }
else{
    document.getElementById(div).innerHTML = "";
   }
}


<!--------------------load to div end ------------------->





function SelectCategory(b,from) {
 
  var category=b.form.category.value;
  return load('ProductTatcategoryajax.asp?from='+from+'&category='+category,'tatcategory');
}


function SearchProducts() {
 
 
  var category=document.form.category.value;
  var tatcategory=document.form.tatcategory.value;
  var ProductName=HebDecode(document.form.ProductName.value)
 
 if (document.form.ByType[0].checked)
 
 {
  var ByType=document.form.ByType[0].value;
  }
  else
  {
  ByType=document.form.ByType[1].value;
  }
  
   str="ProductsResultajax.asp?category="+category;
   str=str+"&tatcategory="+tatcategory;
   str=str+"&ProductName="+ProductName;
   str=str+"&ByType="+ByType;
//   document.form.str.value=str;
   
   return load(str,'centralpart');
   
     
}



function SearchCatFlgSideProducts(category) {
 
 
   str="ProductsResultajax.asp?category="+category;
  
//   document.form.str.value=str;
   
   return load(str,'centralpart');
   
     
}


function SearchSalesProducts() {
 
 
 
   str="ProductsResultajax.asp?FlgSaleWhere=yes";
  
   document.form.str.value=str;
  
   return load(str,'centralpart');
  
}


function view_news(id) {
document.getElementById("datamain").src="ScrollNews.asp?NewsCatId="+id;
}



<!-- START  FORGOTPASS-->

function CheckEmail(Alert1){
if (document.form.Email.value ==""  || document.form.Email.value.indexOf('@')==-1 ){
		window.alert(Alert1)
		document.form.Email.focus()	
		return false;
	}
	document.form.action="SendForgotPass.asp"
	document.form.submit()	
}
<!-- END FORGOTPASS  -->




