/**
 * 
 * Javascript fuer Felix Bloch Erben Redesign 2005
 * (c) 2005 orbyd, multimedia- und softwareentwicklung
 *          vincent hildebrandt <hildebrandt@orbyd.de>
 *
 * @author: vincent hildebrandt
 * @version: $Id: scripts.js,v 1.17 2005/03/18 17:27:04 felix Exp $
 * letzte Aenderung: 23.01.2005, vincent hildebrandt
 * 
 */

function openInfo(url)
{
	w = 655;
	h = 500;
	t = 50;
	l = 50;
	wname = 'infopdf';
	openPopup(url, wname, t, l, w, h, 1);
}

function openHelp(url)
{
	w = 655;
	h = 500;
	t = 50;
	l = 50;
	wname = 'hilfe';
	openPopup2(url, wname, t, l, w, h);
}


function openBroschuere(url)
{
	w = 280;
	h = 400;
	t = 50;
	l = 50;
	wname = 'broschuere';
	openPopup2(url, wname, t, l, w, h);
}

function openPrivacy(url) {
	w = 655;	h = 500;
	t = 50; l = 50;
	wname = 'privacy';
	openPopup(url, wname, t, l, w, h, 1);
}

function openTermsAndConditions(url) {
	w = 655;	h = 500;
	t = 50; l = 50;
	wname = 'termsandconditions';
	openPopup(url, wname, t, l, w, h, 1);
}

function openCharivari(url) {
	w = 700;	h = 500;
	t = 50; l = 50;
	wname = 'charivari';
	openPopup(url, wname, t, l, w, h);
}

function openPopup(url, wname, t, l, w, h, showtoolbox)
{
	if (typeof showtoolbox == 'undefined') showtoolbox = 0;
	mywindow = window.open(url, wname, 'width='+w+',height='+h+',top='+t+',left='+l+',toolbar=' + (showtoolbox ? 'yes' : 'no' ) + ',location=no,status=no,menubar=no,scrollbars=yes');
	mywindow.focus();
}

function openPopup2(url, wname, t, l, w, h)
{
	mywindow = window.open(url, wname, 'width='+w+',height='+h+',top='+t+',left='+l+',toolbar=no,location=no,status=no,menubar=no,scrollbars=0,resizable=0');
	mywindow.focus();
}

var clean = new Array();
function cleanValue(input) {
	formname = input.form.name;
   inputname = input.name;
   if (typeof(clean[formname])!='undefined')
      if (clean[formname][inputname]) {
         input.value = "";
         clean[formname][inputname] = false;
      }
}

function setValue(input,value) {
   if (input.value == "") {
      formname = input.form.name;
      inputname = input.name;
      input.value = value;
      if (typeof(clean[formname])=='undefined') { 
         clean[formname] = new Array();
      }
      clean[formname][inputname] = true;
   }
}

function changeusercategory()
{
	
	var dtype = document.getElementById("icategory").value;
	if (dtype == 5) showdescr();
	else hidedescr();
}

function showdescr() {
	// ok. laut css speci, ist tr ein table-row und kein block
	// der ie kommt damit aber nicht klar - dort nehmen wir weiter block
	if (document.all) b = "block"; else b = "table-row";
	document.getElementById("usercategorytr").style.display = b;
}

function hidedescr() {
	document.getElementById("usercategorytr").style.display = "none";
}

function deactivate(elem)
{
	if (elem)
	{
		elem.value = "vorgang wird bearbeitet";
		elem.disabled = true;
		elem.form.submit();
	}
	return false;
}
