



function openit(str)
{
	myWin = window.open(str,'Bild','width=500,height=530,left=10,top=10,resizable=yes,titlebar=yes,scrollbars=yes,menubar=no');
}

function openimages(str)
{
	myWin = window.open(str,'Bild','width=670,height=540,left=10,top=10,resizable=yes,titlebar=yes,scrollbars=yes,menubar=no');
}
function openmusic(str)
{
	myWin = window.open(str,'Bild','width=820,height=530,left=0,top=0,margin-left=0,margin-top=0,resizable=no,titlebar=no,scrollbars=auto,menubar=no');
}

function openitglobal(str,tit)
{
	myWin = window.open(str,tit,'resizable=yes,titlebar=yes,scrollbars=yes,menubar=yes');
}

function openitklein(str)
{
	myWin = window.open(str,'Gutschein','width=450,height=380,left=10,top=10,resizable=yes,titlebar=yes,scrollbars=yes,menubar=no');
}

function notiz(id)
{
	myWin = window.open('notiz.php?medium_id='+id,'Notiz','width=450,height=320,left=50,top=50,resizable=yes,titlebar=yes,scrollbars=yes,menubar=no');
}

function notiz2(id)
{
	myWin = window.open('notiz2.php?medium_id='+id,'Notiz','width=450,height=220,left=50,top=50,resizable=yes,titlebar=yes,scrollbars=yes,menubar=no');
}

function stat(id)
{
	myWin = window.open('statistik.php?Asin='+id,'Statistik','width=450,height=400,left=50,top=50,resizable=yes,titlebar=yes,scrollbars=yes,menubar=no');
}

function gstat(id)
{
	myWin = window.open('gstatistik.php?Asin='+id,'Statistik','width=450,height=400,left=50,top=50,resizable=yes,titlebar=yes,scrollbars=yes,menubar=no');
}

function wp(id)
{
	myWin = window.open('wunschpreis.php?Asin='+id,'Wunschpreis','width=450,height=355,left=50,top=50,resizable=yes,titlebar=yes,scrollbars=yes,menubar=no');
}

function tracks(id,cd)
{
	myWin = window.open('tracks.php?asin='+id+'&cd='+cd,'Trackliste','width=550,height=365,left=50,top=50,resizable=yes,titlebar=yes,scrollbars=yes,menubar=no');
}

function showpic(id,x,y)
{
	myWin = window.open('showpicture.php?bild='+id,'Bild','width='+x+',height='+y+',left=10,top=1,resizable=yes,titlebar=yes,scrollbars=yes,menubar=no');
}

function review(no)
{
	myWin = window.open('review.php?no='+no,'Review','width=450,height=400,left=50,top=50,resizable=yes,titlebar=yes,scrollbars=yes,menubar=no');
}

function disit()
{
	document.amaform.submit();
	window.location.href='wunschzettel.php?mode=update';
}

function absenden(lasin,lrubrik,lmode)
{
	document.myform.asin.value=lasin;
	document.myform.rubrik.value=lrubrik;
	document.myform.mode.value=lmode;
	document.myform.submit();
}

function absenden2()
{
	document.myform.asin.value='';
	document.myform.rubrik.value=1;
	document.myform.mode.value=document.myform.akt.value;
	document.myform.submit();
}

function goabsenden()
{
	document.myform.asin.value='';
	document.myform.rubrik.value=1;
	document.myform.mode.value=document.myform.akt2.value;
	//alert(document.myform.akt2.value);
	document.myform.submit();
}

function saveprices()
{
	document.myform.asin.value='';
	document.myform.rubrik.value=1;
	document.myform.mode.value='allpreischange';
	//alert(document.myform.akt2.value);
	document.myform.submit();
}

function kombisuche()
{
	document.myform.asin.value='';
	document.myform.rubrik.value=1;
	document.myform.mode.value='buy';
	document.myform.pager.value=1;
	document.myform.submit();
}

function amabuyit()
{
	document.myform.asin.value='';
	document.myform.rubrik.value=1;
	document.myform.mode.value='amabuy';
	document.myform.submit();
}

function goabsenden2()
{
	document.myform.asin.value='';
	document.myform.rubrik.value=1;
	document.myform.mode.value='buy';
	document.myform.submit();
}

function goabsenden_seite(i)
{
	document.myform.asin.value='';
	document.myform.pager.value=i;
	document.myform.pager2.value=i;
	document.myform.rubrik.value=1;
	document.myform.mode.value='buy';
	document.myform.unten.value=1;
	document.myform.submit();
}

function goabsenden4()
{
	document.myform.asin.value='';
	document.myform.rubrik.value=1;
	document.myform.mode.value='buy';
	document.myform.unten.value=1;
	document.myform.submit();
}

function goabsenden5()
{
	document.myform.rubrik.value=2;
	document.myform.page.value=1;
	document.myform.submit();
}

function seite(page)
{
	document.myform.asin.value='';
	document.myform.rubrik.value=1;
	document.myform.mode.value='buy';
	document.myform.pager.value=page;
	document.myform.submit();
}

function goabsenden3()
{
	document.myform.asin.value='';
	document.myform.rubrik.value=3;
	document.myform.mode.value=document.myform.akt2.value;
	document.myform.submit();
}

function switchpic()
{
	document.myform.mode.value='switchpic';
	document.myform.submit();
}

function deli(dasin,anz) {
    //alert ('Test');
    if (anz.value == 0) {
        document.amaform.action = "wunschzettel.php";
	document.amaform.target = "_top";
        document.amaform.mode.value='bestupd';
	document.amaform.asin.value=dasin;
        document.amaform.submit();
    }
}
function ena() {
    //alert("test");
    if (document.formul.ort.value == "Blended" || document.formul.ort.value == "ASIN" || document.formul.ort.value == "DVD") {
      document.formul.minp.disabled=true;
      document.formul.maxp.disabled=true;
      document.getElementById("psp").style.color="#999999";
      //alert ('drin');
    } else {
      document.formul.minp.disabled=false;
      document.formul.maxp.disabled=false;
      document.getElementById("psp").style.color="#000000";
    }
}

function radioWert(rObj) {
 for (var i=0; i<rObj.length; i++) if (rObj[i].checked) return rObj[i].value;
 return false;
}

function ena2() {
    //alert("test");
     if (radioWert(document.formul.auswahl) != "keyword") {
      document.formul.pvon.disabled=true;
      document.formul.pbis.disabled=true;
      document.getElementById("psp").style.color="#999999";
      //alert ('drin');
    } else {
      document.formul.pvon.disabled=false;
      document.formul.pbis.disabled=false;
      document.getElementById("psp").style.color="#000000";
    }
}


function getWW() {
  var de = document.documentElement;
  return window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
}
function getHH() {
  var de = document.documentElement;
  return window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight;
}

$(document).ready(function() {


// Menu

$("div#box").bind("mouseenter",function(){
  $('div#box').show();
}).bind("mouseleave",function(){
  $('div#box').hide();
});


$('a#sparen').mouseover(function() {
    $('div#box').show();
    $('div#box').css('left','213px');
    $('div#box').css('top','108px');
    $('div#box').html("<img src='/images/farlink.gif' alt=''><a href='/sparen.php'>DVD Schnäppchenfinder</a><br>\
<img src='/images/farlink.gif' alt=''><a href='/dvd-schnaeppchen-40--------1.htm'>Heutige DVD-Bestpreise</a><br>\
<img src='/images/farlink.gif' alt=''><a href='/preisaktionen.php'>DVD Preisaktionen & Specials</a><br>\
<img src='/images/farlink.gif' alt=''><a href='/vormerken.php'>DVD Vormerken</a>\
<hr style='width:190px;' size=1 noshade>\
<img src='/images/farlink.gif' alt=''><a href='/nondvd_bp.php'>Bestpreise (nicht DVD)</a><br>\
<img src='/images/farlink.gif' alt=''><a href='/buecher'>Dt. und engl. Bücher</a><br>\
<img src='/images/farlink.gif' alt=''><a href='/musik'>Musik</a><br>\
<img src='/images/farlink.gif' alt=''><a href='/elektronik'>Elektronik</a><br>\
<img src='/images/farlink.gif' alt=''><a href='/spiele'>Video Games</a><br>\
<img src='/images/farlink.gif' alt=''><a href='/software'>Software</a><br>\
<img src='/images/farlink.gif' alt=''><a href='/spielwaren'>Spielwaren</a><br>\
<img src='/images/farlink.gif' alt=''><a href='/sparen.php?art=K%FCche%20Haus%20und%20Garten'>Küche Haus + Garten</a>");
}).mouseout(function() {
    $('div#box').hide();
});

$('a#themenwelt').mouseover(function() {
    $('div#box').show();
    $('div#box').css('left','278px');
    $('div#box').css('top','108px');
    $('div#box').html("<p style='margin:0px'><b>Dauerbrenner</b></p>\
<img src='/images/farlink.gif' alt=''><a href='/geburtstage.php'>Aktuelle Star-Geburtstage</a><br>\
<img src='/images/farlink.gif' alt=''><a href='/themenwelt.php?id=96'>DVD-Formate</a> Kurzüberblick\
<p style='margin:0px;margin-top:5px'><b>Amapsys Inside</b></p>\
<img src='/images/farlink.gif' alt=''><a href='/xml.php'>Über 100 RSS-Feeds</a>\
<p style='margin:0px;margin-top:5px'><b>Amapsys-Amazon-Tools</b></p>\
<img src='/images/farlink.gif' alt=''><a href='/amasnapper.php'>amaSnapper Bookmarklet</a><br>\
<img src='/images/farlink.gif' alt=''><a href='/amawatcher.php'>amaWatcher Bookmarklet</a><br>\
<img src='/images/farlink.gif' alt=''><a href='/amatoolbar.php'>Unsere Amapsys-Toolbar</a><br>\
<img src='/images/farlink.gif' alt=''><a href='/amagreasemonkey.php'>Greasemonkey Userscript</a>\
");
}).mouseout(function() {
    $('div#box').hide();
});

$('a#tvkino').mouseover(function() {
    $('div#box').show();
    $('div#box').css('left','371px');
    $('div#box').css('top','108px');
    $('div#box').html('<img src=\'/images/farlink.gif\' alt=\'\'><a href=\'/tv-highlights.php\'>TV-Highlights</a><br><img src=\'/images/farlink.gif\' alt=\'\'><a href=\'/kino_filme.php\'>Kino-Neuerscheinungen</a>');
}).mouseout(function() {
    $('div#box').hide();
});

$('a#suchen').mouseover(function() {
    $('div#box').show();
    $('div#box').css('left','437px');
    $('div#box').css('top','108px');
    $('div#box').html('<img src=\'/images/farlink.gif\' alt=\'\'><a href=\'/search.php\'>Spezielle DVD-Suche</a>');
}).mouseout(function() {
    $('div#box').hide();
});

$('div#kat').click(function(event) {
    var ww = getWW();
    var pos = $('div#kat').position();
    x = pos.left-155;
    y = pos.top+5;
    $('div#box').show();
    $('div#box').css('left',x);
    $('div#box').css('top',y);
    $('div#box').css('width','150px');
    $('div#box').load('/cat_ajax.php');

}).mouseout(function() {
    $('div#box').hide();
});

//$(".tt").addTablePager({results : 20, position : "top"});

});
