function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function startpage(obj)
{
 obj.style.behavior='url(#default#homepage)';
 obj.setHomePage('http://www.db.am');
}

function addf()
{
 window.external.addFavorite('http://www.db.am','www.db.am - база данных товаров магазинов рунета. поиск.');
}

function addtext(text)
{
   document.form1.wrds.value = text;
   return false;
}


function changePrc(which,make,model){
	if(which == 'One'){
			document.form1.pb.options.length = 0;
			for(i=0;i<aryPrcCount[make];i++){
				document.form1.pb.options[i] = new Option(aryPrc[make][i],i);
			}
	document.form1.pb.options.selectedIndex = aryPrcCount[make]-1;
	}
}


function loadpage1(which,make,model){
	document.form1.pb.options.length = 0;
	for(i=0;i<aryPrcCount[0];i++){
		if (document.form1.pa.options[i].selected == true) {count=document.form1.pa.options[i].text;}
	}
	for(i=0;i<aryPrcCount[count];i++){
		document.form1.pb.options[i] = new Option(aryPrc[count][i],i);
	}
	if (make == '') {
		document.form1.pb.options.selectedIndex = aryPrcCount[count]-1;
	}
	else {
		document.form1.pb.selectedIndex = make;
	}

}



function CheckIt() {

   var str1 = document.form2.reply_name.value;
   document.form2.reply_name_len.value = 30 - str1.length;

   var str2 = document.form2.reply_text.value;
   document.form2.reply_text_len.value = 1000 - str2.length;
}


function voteopen(item_id, vote)
{
   url='http://www.db.am/inc/voter.php?item_id='+item_id+'&vote='+vote;
   window.open(url, '_blank', 'height=170, width=300, status=no, toolbar=no, menubar=no, location=no, resizable=no');
}
