var flashvars = {};
var params = {};
params.menu = false;
params.bgcolor = '#e2e2e2';
params.quality = 'high';
var attributes = {};
attributes.align = 'center';

function validate_search_query()
{
    var field = document.getElementById('search_query_field');
    if (field.value == 'Поиск товара' || !field.value) {
        field.value = 'Поиск товара';
        field.blur();
        alert('Введите фразу для поиска');
        return false;
    }
    return true;
}


var flashvars = {};
var params = {
	menu: "false",
	wmode: "transparent",
	quality: "high"
};
var attributes = {};
attributes.align = 'center';

var w, h;           // Объявляем переменные, w - длина, h - высота
h = (window.innerHeight ? window.innerHeight : (document.documentElement ? document.documentElement.clientHeight : document.body.offsetHeight));
w = (window.innerWidth ? window.innerWidth : (document.documentElement ? document.documentElement.clientWidth : document.body.offsetWidth));
if (typeof swfobject != 'undefined') {
    swfobject.embedSWF('flash/pashalka.swf', 'pashalka_container', w-14, 1500, '9.0.0', false, flashvars, params, attributes);
}


function screenSize()
{
	var w1, h1;           // Объявляем переменные, w - длина, h - высота
	w1 = (window.innerWidth ? window.innerWidth : (document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.offsetWidth));
	document.getElementById("pashalka_container").style.width  = w1;
};


function show_flash(){
 document.getElementById('pashalka_container').style.display="block";
}

/*function init() {
  // quit if this function has already been called
  if (arguments.callee.done) return;

  // flag this function so we don't do the same thing twice
  arguments.callee.done = true;

  // kill the timer
  if (_timer) clearInterval(_timer);

  // do stuff
  show_deliverytoday_ad();
};*/

/* for Mozilla/Opera9 */
/*if (document.addEventListener) {
  document.addEventListener("DOMContentLoaded", init, false);
}*/

/* for Internet Explorer * /
/ *@cc_on @* /
/ *@if (@_win32)
  document.write("<script id=__ie_onload defer src=javascript:void(0)><\/script>");
  var script = document.getElementById("__ie_onload");
  script.onreadystatechange = function() {
    if (this.readyState == "complete") {
      init(); // call the onload handler
    }
  };
/ *@end @* /

/* for Safari */
/*if (/WebKit/i.test(navigator.userAgent)) { // sniff
  var _timer = setInterval(function() {
    if (/loaded|complete/.test(document.readyState)) {
      init(); // call the onload handler
    }
  }, 10);
}*/

/* for other browsers */
//window.onload = init;

