var oncell = "c0"
function chgColor(celno)
{
 var chgcell
 if (document.layers) { //browser is NN
	for (var i = 1; i < 5; i++)
	//for (var i = 1; i < 100; i++)
	{
	chgcell = "window.document.c" + i + ".bgColor='#8ACC4F'";
	eval(chgcell);
	}
chgcell = "window.document."+ celno + ".bgColor='#D2FFA9'";
}
else // assume IE5
{for (var index =1; index < 5; index++)
//{for (var index =1; index < 100; index++)
 {
 	clrIt = "document.getElementById('c"+ index +"').bgColor='#8ACC4F'"; 
	
	eval(clrIt);
	}
chgcell = "document.getElementById('"+ celno + "').bgColor='D2FFA9'";
}
 eval(chgcell);
}

function overm(celno)
{
 var chgcell
 if (document.layers) { // browser is NN
	chgcell = "window.document."+ celno + ".bgColor='#D2FFA9'";
}
else //assume IE
{
	chgcell = "document.getElementById('"+ celno + "').bgColor='#D2FFA9'";
}
 eval(chgcell);
}

function outm(celno)
{ var chgcell
 if (document.layers) { // browser is NN
	chgcell = "window.document."+ celno + ".bgColor='#8ACC4F'";
}
else //assume IE
{chgcell = "document.getElementById('"+ celno + "').bgColor='#8ACC4F'";
}
 eval(chgcell);
}



function ChangeSub()
{
	id=document.form1.Sub1.value;
	name=document.form1.Sub1[document.form1.Sub1.selectedIndex].text;
	name1=reverse(name)	
	if (id!="-1")
	{
		if (id=="A")
			location.replace("BestSellers.asp");
		else if (id=="B")
			location.replace("sales_page.asp");
		else if (id=="C")
			location.replace("new_page.asp");
		else
			location.replace("category_page.asp?subj="+id+"&name="+name1);
		
	}
}

function reverse(name)
{
	var name1="";
	for ( i=name.length ; i>0 ; i-- )
		name1 =name1 + name.substring(i,i-1);
	return name1;
}




	if(document.images)
	{
	var m01off=new Image();
	var m01on=new Image();	

	var m02off=new Image();
	var m02on=new Image();	
    
	var m03off=new Image();
   	var m03on=new Image();

	var m04off=new Image();
    var m04on=new Image();
	
	var m05off=new Image();
    var m05on=new Image();
	
	var m06off=new Image();
    var m06on=new Image();
	
	var m07off=new Image();
    var m07on=new Image();
	

		}
	
	function init()
	{
		if (document.images)
		{
		    m01off.src="https://www.academon.co.il/images/top_but_01.gif";
		    m01on.src="https://www.academon.co.il/images/top_but_01_on.gif";
			
		    m02off.src="https://www.academon.co.il/images/top_but_02.gif";
		    m02on.src="https://www.academon.co.il/images/top_but_02_on.gif";
 
		    m03off.src="https://www.academon.co.il/images/top_but_03.gif";
		    m03on.src="https://www.academon.co.il/images/top_but_03_on.gif";

		    m04off.src="https://www.academon.co.il/images/top_but_04.gif";
		    m04on.src="https://www.academon.co.il/images/top_but_04_on.gif";
			
			m05off.src="https://www.academon.co.il/images/top_but_05.gif";
		    m05on.src="https://www.academon.co.il/images/top_but_05_on.gif";
			
			m06off.src="https://www.academon.co.il/images/top_but_06.gif";
		    m06on.src="https://www.academon.co.il/images/top_but_06_on.gif";
			
			m07off.src="https://www.academon.co.il/images/top_but_07.gif";
		    m07on.src="https://www.academon.co.il/images/top_but_07_on.gif";
			

		}
	}
	
	function img_roll(imgName)
	{
		if (document.images)
		{
			document[imgName].src=eval(imgName +'on.src');
		}
	}

	function img_rollout(imgName)
	{
		if (document.images)
		{
			document[imgName].src=eval(imgName +'off.src');
		}
	}
	
	init();
	
	
	

function jstrim(mystr)
{
	var tmpStr;
	rl = / */;
	rr = / *$/;
	tmpStr = mystr.replace(rl, "");
	r = tmpStr.replace(rr, "");
	return r;
}

function searchValidate (){
	if (jstrim(document.form1.Search1.value)==""){
		document.form1.Search1.value=="";
		alert("הקלד נתונים לחיפוש");
		document.form1.Search1.focus();
		return false;
	}
	return true;
}

	/**********ICON ON*********/
	img_a=new Image();
	img_a.src="https://www.academon.co.il/images/icon-on_01.gif";
	img_b=new Image();
	img_b.src="https://www.academon.co.il/images/icon-on_02.gif";
	img_c=new Image();
	img_c.src="https://www.academon.co.il/images/icon-on_03.gif";
	img_d=new Image();
	img_d.src="https://www.academon.co.il/images/icon-on_04.gif";
	img_e=new Image();
	img_e.src="https://www.academon.co.il/images/icon-on_05.gif";
	img_f=new Image();
	img_f.src="https://www.academon.co.il/images/icon-on_06.gif";
	img_g=new Image();
	img_g.src="https://www.academon.co.il/images/icon-on_07.gif";
	/**********END ICON ON*********/

