// JavaScript Document
function Favorites()
{
    if ((navigator.appName == "Microsoft Internet Explorer") &&
          (parseInt(navigator.appVersion) >= 4))
    {
        var url="http://www.antikbuch24.de/"
        var title="Neubuch24 - Ihr Internet-Buchhändler"
        window.external.AddFavorite(url,title)
    }
    else
    {
        var FavText = "Neubuch24 - Ihr Internet-Buchhändler";
        if(navigator.appName == "Netscape")
        {
           FavText += " mit den Tasten STRG+D";
        }
        FavText += " zu den Favoriten hinzufügen";
        alert(FavText);
    }
}

function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
 	toolbar_str = toolbar ? 'yes' : 'no';
 	menubar_str = menubar ? 'yes' : 'no';
	statusbar_str = statusbar ? 'yes' : 'no';
	scrollbar_str = scrollbar ? 'yes' : 'no';
	resizable_str = resizable ? 'yes' : 'no';
	window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}

function newWin(name, url, width, height, args) {
   var newWin = new Object();
   newWin.args = args;
   newWin.url = url;
   newWin.name = name;
   newWin.width = width;
   newWin.height = height;
   if (document.layers) {// browser is NN
       newWin.left = window.screenX + ((window.outerWidth - newWin.width) / 2);
       newWin.top = window.screenY + ((window.outerHeight - newWin.height) / 2);
       var attr = 'screenX=' + newWin.left + ',screenY=' + newWin.top + ',resizable=yes,width=' + newWin.width + ',height=' + newWin.height + ',' + newWin.args;
      } else {// browser is MSIE
       newWin.left = (screen.width - newWin.width) / 2;
       newWin.top = (screen.height - newWin.height) / 2;
       var attr = 'left=' + newWin.left + ',top=' + newWin.top + ',resizable=yes,width=' + newWin.width + ',height=' + newWin.height + ',' + newWin.args;
      }
   newWin.win=window.open(newWin.url, newWin.name, attr);
   newWin.win.opener=self;
   newWin.win.focus();
}

var clickAllowed = true;

function bestellen(book_id, typ) {
	var f = document.forms['form_'+book_id];
  var anzahl = 1;
  if (clickAllowed) {
	  clickAllowed = false;
		if (typ=='bestellen')
			newWin('bestellen','in_den_korb.html','425','225','scrollbars=no');
		f.submit();
		setTimeout("clickAllowed=true;",5000);
	}
}

function senden(formname) {
	document.getElementById('send').value = "Daten werden gesendet";
	document.getElementById('send').disabled = true;
	document.forms[formname].submit();
}