// JavaScript Document
/********/
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
/********/
function openWin(wfile, wtitle, wwidth, wheight) { //URL, Titel, Breite, Höhe)
  var scroll;
  if(openWin.arguments.length == 5) scroll = 0; else scroll = 1;
  var defstr = 'width='+wwidth+',height='+wheight+',screenX=50,screenY=80,left=100,top=150,hotkeys=0,toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars='+scroll+',resizable=1';
  newWindow=open(wfile, wtitle, defstr);newWindow.focus();
}

var today = new Date();
var expiry = new Date(today.getTime() + 365 * 24 * 60 * 60 * 1000);
var expired = new Date(today.getTime() - 365 * 24 * 60 * 60 * 1000);

function setCookie(name, value) {
    if (value != null && value != "")
      document.cookie=name + "=" + escape(value) + "; expires=" + expiry.toGMTString();
}

function setSearchCookie() {
	var value = document.searchForm.title.value + "///" + document.searchForm.director.value + "///" + document.searchForm.actor.value + "///" + document.searchForm.category.options[document.searchForm.category.selectedIndex].value + "///" + document.searchForm.owner.options[document.searchForm.owner.selectedIndex].value;
    if (value != null && value != "")
      document.cookie="search" + "=" + escape(value) + "; expires=" + expiry.toGMTString();
}

function deleteSearchCookie() {
      document.cookie="search" + "=''; expires=" + expired.toGMTString();
}

function yahooWindow(title) {
	var targetURL = "http://search.movies.yahoo.com/moviesintgsearch?search=all&p=" + title;
	newWindow = open(targetURL, 'yahoo', '');
}

function kinopolisWindow(title) {
	var targetURL = "http://www.google.ch/search?q=" + title + "+site%3Awww.kinopolis.de&btnI=Auf+gut+Gl%C3%BCck%21";
	newWindow = open(targetURL, 'kinopolis', '');
}

function amazonWindow(title) {
	var targetURL = "http://www.google.ch/search?q=" + title + " dvd+site%3Awww.amazon.com&btnI=Auf+gut+Gl%C3%BCck%21";
	newWindow = open(targetURL, 'amazon', '');
}
