  function openNewWinAll(url,name, scr, w, h)
  {
    name = window.open(url, name, 'toolbar=no,location=no,status=no,menubar=no,resizable=no,directories=no,scrollbars='+scr+',width='+w+',height='+h+'');
  }



  function gotolink(n)
  {
   s=eval("window.document.qnavigation."+n);
   document.location=s.options[s.selectedIndex].value;
  }
  
  function getParam(p)
  {
    var param = new Array();
    var aPairs = document.location.search.substring(1).split("&");
    for (var i=0; i<aPairs.length;i++)
    {
     var tmp = aPairs[i].split("=");
     param[tmp[0]+""] = tmp[1]+"";
    }
    if (param[p]+""=="undefined") param[p]="0";
  return param[p];
  }

// Sets cookie values.
  function setCookie(name,value,days) 
  {
     var today = new Date();
     var expires = new Date();
     expires.setTime(today.getTime()+1000*60*60*24*days);
     document.cookie = name + "="+escape(value)+"; expires="+expires.toGMTString();
  return;
  }
  
  // Gets cookie values.
function getCookie(Name)
{
  var search = Name + "=";
  if (document.cookie.length > 0)  // if there are any cookies
  {
    offset = document.cookie.indexOf(search);
    if (offset != -1)  // if cookie exists 
    {
      offset += search.length;    // set index of beginning of value
      end = document.cookie.indexOf(";", offset);  // set index of end of cookie value
      if (end == -1) 
      {
        end = document.cookie.length;
      }
      return unescape(document.cookie.substring(offset, end));
    } 
  }
}


function ChangeGraf(grname,source)
{
  eval("document."+grname+".src = \"/images/graphics/homepage/"+source+".gif\"");
}



  //Check Form
function CheckForm()
{
   if (document.Formx.Email.value!="" && document.Formx.Remarks.value!="") 
   {
     return true;   
   } 
   else 
   {
     alert("Please, fill the required fields.");
     return false;
   }
}

function GetDate(shift)
{
  var dt=new Date();
  dt.setDate(dt.getDate()+shift);
  var day = dt.getDate();
  var month = dt.getMonth()+1;
  var year = dt.getFullYear();
  if (day < 10)   day   = "0"+day;
  if (month < 10) month = "0"+month;
  return day+"."+month+"."+year;
}
