// JavaScript Document
function quest()
{
windop = window.open("ask.php","mywin","height=450,width=510,left=100,top=30");
}

function zakaz()
{
windop = window.open("buy.php","mywin","height=550,width=520,left=100,top=30");
}

function markText()
{
if (document.getElementById('textfield').value == 'Поиск')
{
document.getElementById('textfield').value = '';
document.getElementById('textfield').style.color = '#666666';
}
}

function refreshWind()
{
//if (window.location.reload)
//{
//document.getElementById('textfield').value = 'Поиск';
//document.getElementById('textfield').style.color = '#666666';
//}
}


function ChangeImg() {
 if(document.images) {
  eval("document."+ChangeImg.arguments[0]+
  ".src=('"+ChangeImg.arguments[1]+"')");
 }
}

function preload() {
  if (document.images) {
    var imgsrc = preload.arguments;
    arr=new Array(imgsrc.length);
    for (var j=0; j<imgsrc.length; j++) {
      arr[j] = new Image;
      arr[j].src = imgsrc[j];
    }
  }
}

function Toggle(id)
{
var Elems = document.getElementById (id);
if (Elems) Elems.style.display = Elems.style.display == 'none' ? 'block' : 'none';
}

function ToggleAdditions(id)
{
var Additions = document.getElementById (id);
if (Additions) Additions.style.display = Additions.style.display == 'none' ? 'block' : 'none';
}