function pic(p)
{
	if(p==4)
			location="http://www.transkom-n.ru"
	else	
		location="/produkt"
}
function f(p)
{
	//alert(p)
	//return false;
	if(p==1)	
		location="/filial/novosibirsk"
		
	if(p==5)	
		location="/filial/krasnoyarsk"
	if(p==4)	
		location="/filial/habarovsk"
	if(p==6)	
		location="/filial/irkutsk"
	if(p==3)	
		location="/filial/omsk"
	if(p==2)	
		location="/filial/novokuzneck"

	if(p==10)	
		location="/"
		

}
function menuicon(id, f)
{
	// 
	//alert(document.getElementById(id+"j").src)
	if(document.getElementById(id+"j").src.indexOf("__")!=-1)
	{
		//alert(f)//
		//document.getElementById(id+"j").src="/img/icon_sel_2.png"
		document.getElementById(id+"j").src=document.getElementById(id+"j").src.replace("__", "_sel_")
	}
	else
		if(document.getElementById(id+"k").className!="menu_sel")
			document.getElementById(id+"j").src=document.getElementById(id+"j").src.replace("_sel_", "__")
}
function menuicon2(id, obj)
{
	
	if(obj.className!="menu_sel")
	{
	//	alert("ok")
		if(document.getElementById(id+"j").src.indexOf("__")!=-1)
			document.getElementById(id+"j").src=document.getElementById(id+"j").src.replace("__", "_sel_")
		else
			document.getElementById(id+"j").src=document.getElementById(id+"j").src.replace("_sel_", "__")
	}
}
		
function isIt(input, it)
{
	if(it=="empty")
	{
		check= new Array(" ",  "	");	
		if(input=="")
			return true
	}	
	if(it=="digit")
		check= new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 0);	
	if(it=="charOrDigit")
 		check= new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 0, "q", "w", "e",  "r", "t", "y", "u", "i", "o", "p", "a", "s", "d", "f", "g", "h", "j", "k", "l", "z", "x", "c", "v", "b", "n", "m");

for (var i = 0; i < input.length; i++)
  {
    var chr = input.charAt(i);
    var found = false
    for (var j = 0; j < check.length; j++) 
      if (chr == check[j]) found = true
    if (!found) return found
   }
   return found
}
function showdv(what)
{
//	alert(document.getElementById("v"+what).style.display="block")
//		return
	if(document.getElementById("v"+what).style.display=="block")
		document.getElementById("v"+what).style.display="none"
	else
		document.getElementById("v"+what).style.display="block"
}
function show(what, vis)
{
	document.getElementById(what).style.display=vis
}
function showgoods(id)
{
	window.open('/show.php?id='+id,'_blank','left='+((document.body.clientWidth-850)/2)+', top=200, width=850px,height=560px,location=no,toolbar=no,status=no,scrollbars=yes'); 

}
function bigphoto(obj)
{
	var str=obj.src.toString()
	document.getElementById('mainphoto').src=str.replace('/1/', '/3/')
}