/*
* (c)2005 equitrader - Inh. Sigi Stephan, 56307 Dernbach
* This software is part of the CD-ROM Server wamp4cd
* wamp4cd is copyright by equitrader. All rights reserved.
*/
google_ad_client = "pub-1623301470190251";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "2D5166";
google_color_bg = "FFFFFF";
google_color_link = "2D5166";
google_color_url = "2D5166";
google_color_text = "000000";

//<script type="text/javascript"
//  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
//</script>


var selected;
var submitter = null;

	window.onload=doOnLoad;

function doOnLoad()
{
}

function popup()
{
	ht = (screen.height/3)*2;
	if(ht<200)
		ht=200;
	helpwin = window.open("help.php",'helpWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=620,height='+ht+',screenX=50,screenY=150,top=50,left=150');
	helpwin.focus()	;
}


function popupWindow(url) {
  window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150');
}  

function selectRowEffect(object, buttonSelect) {
  if (!selected) {
    if (document.getElementById) {
      selected = document.getElementById('defaultSelected');
    } else {
      selected = document.all['defaultSelected'];
    }
  }
  if (selected) 
  	selected.className = 'moduleRow';
  object.className = 'moduleRowSelected';
  selected = object;

// one button is not an array
	if(typeof(document.checkout_payment)!="undefined"){
	  if (document.checkout_payment.payment[0]) {
    	document.checkout_payment.payment[buttonSelect].checked=true;
	  } else {
    	document.checkout_payment.payment.checked=true;
	  }
	}
}

function rowOverEffect(object) {
  if (object.className == 'moduleRow') object.className = 'moduleRowOver';
}

function rowOutEffect(object) {
  if (object.className == 'moduleRowOver') object.className = 'moduleRow';
}
function rowOver(object, cname, help) {
	if(typeof(object)!="undefined"){
		if(typeof(cname)!="undefined" && cname!='')
			object.className = cname;
		object.style.cursor = "hand";
	}
	if(typeof(help)!="undefined")
		showStatus(help);
}
function rowOut(object) {object.className = '';}
function rowClick(ref) {window.location.href=ref;}

var _mstate=0;
var _mline;
function showStatus(line)
{
	if(typeof(line)=="undefined" || line==''){
		if(_mstate==1){
			_mstate=0;
			window.setTimeout('_showStatusDefault()', 300);
			return;
		}
		return;
	}
	_mstate=1;
	_mline=line;
//	window.setTimeout("window.status='" +  line  + "'", 1);
	window.setTimeout('_showStatus()', 0);
}
function _showStatus()
{
	window.status=_mline;
}

function _showStatusDefault()
{
	if(_mstate==0){
		_mline="equitrader - Das Fachhandelsportal rund um den Pferdesport";
		window.status=_mline;
		window.defaultStatus = _mline;
	}
}

function _insertReiter(ref, ttl)
{
	st = '<a href="';
	st += ref;
	st += '" onmouseover="showStatus(\'';
	st += ttl;
	st += '\');" onmouseout="showStatus();"><span>';
	st += ttl+'</span></a>';
	document.write(st);
}

function _insertLink(ref, ttl, cn)
{
	cnl="";
	if(typeof(cn)!="undefined" && cn!="")
		cnl = 'class="'+cn+'"';
	st = '<a href="';
	st += ref;
	st += '" '+cnl;
	st += '" onmouseover="showStatus(\'';
	st += ttl;
	st += '\');" onmouseout="showStatus();">';
	st += ttl+'</a>';
	document.write(st);
}


function _insertPopLink(ref, ttl, cn)
{
	cnl="";
	if(typeof(cn)!="undefined" && cn!="")
		cnl = 'class="'+cn+'"';
	st = '<a href="" ';
	st += '" onclick="javascript:window.open(\'';
	st += ref;
	st += '\', \'faxorder\', \'toolbar=0, width=640, height=600\');return false;" '+cnl;
	st += '" onmouseover="showStatus(\'';
	st += ttl;
	st += '\');" onmouseout="showStatus();">';
	st += ttl+'</a>';
	document.write(st);
}
function checkBox(object) {document.account_newsletter.elements[object].checked = !document.account_newsletter.elements[object].checked;}
function popupImageWindow(url) {window.open(url,'popupImageWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')}

function openWin(url, opt) 
{
	if(typeof(opt)=="undefined" || opt =="")
		opt='toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=700,height=550,screenX=50,screenY=50,top=50,left=50';
	wizzard = window.open(url, 'openwin', opt);
	try{
		wizzard.opener = this;
	}
	catch(error){
		return;
	}
	wizzard.focus();
}

function openMailer(url, opt) 
{
	if(typeof(opt)=="undefined" || opt =="")
		opt='toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=0,height=0';
	mailer = window.open(url, 'mailwin', opt);
	try{
		mailer.opener = this;
	}
	catch(error){
		return;
	}
	mailer.focus();
}

function openNav(url) 
{
	
	wd = (screen.width/3)*2;
	newnav = window.open(url,
		'navigat',
		'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width='+wd+',left=0,copyhistory=no'
	);
	try{
		newnav.opener = this;
	}
	catch(error){
	}

	if(newnav)
		newnav.focus();
}

function etHelp(url, opt) 
{
	wd = (screen.width/3)*2;
	if(wd<720)
		wd=720;
	if(typeof(opt)=="undefined" || opt =="")
		opt='toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width='+wd+',height=400,screenX=50,screenY=10,top=50,left=10';
	if(typeof(document.HELP_IDX)!="undefined")
		url+="/HIDX/"+document.HELP_IDX;
	helpsys = window.open(url, 'helpsys', opt);
	try{
		helpsys.opener = this;
	}
	catch(error){
		return;
	}
	helpsys.focus();
}

function syncByHelp(uri)
{
	if(uri && uri!="")
		window.location = uri;
}

function check_form_optional(f_name) {
  var form = f_name;
  var firstname = form.elements['firstname'].value;
  var lastname = form.elements['lastname'].value;
  var street_address = form.elements['street_address'].value;

  if (firstname == '' && lastname == '' && street_address == '') {
    return true;
  } else {
    return check_form(form_name);
  }
}

function check_searchform()
{
	if(typeof(document.quick_find)!="undefined"){
		if(document.quick_find.adv_kw.value!=""){
			document.quick_find.submit();
			return;
		}
	}
	return true;
}
var submitter = null;
function submitFunction() {
   submitter = 1;
   }

function om_click_link(ref)
{
}

function om_over(obj)
{
  obj.style.cursor = "hand";
}

function om_out(obj)
{
  obj.style.cursor = "";
}

function addEventQueue(fkt){
	if ( typeof window.addEventListener != "undefined" )
		window.addEventListener( "load", fkt, false );
	// IE 
	else if ( typeof window.attachEvent != "undefined" ) {
		window.attachEvent( "onload", fkt );
	}
	else {
		if ( window.onload != null ) {
			var oldOnload = window.onload;
			window.onload = function ( e ) {
				oldOnload( e );
				eval(fkt);
			};
		}
		else 
			window.onload = fkt;
	}
}

function AskWiki()
{
	function xtom(f){ 
		if(f.document.selection){ 
			return f.document.selection.createRange().text; 
		}
		else if(f.window.getSelection){
			return f.window.getSelection();
		} 
		else {
			return '';
		}
	};
	var ftom=top.frames;
	if(ftom.length==0){ 
		stom=xtom(self) 
	} 
	else{ 
		for(itom=0;itom<ftom.length;itom++) 
			stom=xtom(ftom[itom]) 
	} 
	if(stom!=''){ 
		void(dtom=open('http://de.wikipedia.org/wiki/'+stom,'','')) 
	}
}

function Button(txt, fkt, help,cls)
{
	if(typeof(cls)=="undefined")
		cls = "btn";

	st = '<input class="'+cls+'" value="';
	st += txt;
	if(fkt && fkt !=""){
		st+= '" type="button" ';
		st += ' onclick="'+fkt+';"';
	}
	else
		st+= '" type="submit" ';
	st += ' onmousedown="Button_hover(this);"';
	st += ' onmouseout="Button_out(this);"';
	if(help && help!="")
		st+=' title="'+help+'">';
	else
		st+=' title="'+txt+'">';
	document.write(st);
}

function Button_Div(txt, fkt, help)
{
	if(help && help!="")
		ht = help;
	else
		ht = txt;

	st = '<div id="btn" ';
	st+=' title="'+ht+'"';

	st+='><a href="'+fkt+'"';
	st+=' title="'+ht+'"';
	st += ' onmousedown="Button_hover(this);"';
	st += ' onmouseout="Button_out(this);"';
	st+= '>'+txt+'</a></div>';
	document.write(st);
}

function Button_hover(obj){ 
	obj.className = obj.className + "_over";
	obj.style.cursor = "hand"; 
}
function Button_out(obj){ 
	var className = obj.className;
	var pos = className.indexOf("_over");
	if(pos>-1)
		obj.className = className.substr(0, pos);
}

function CopyForm(form)
{
	var data="";
	for(i=0;i<form.length;i++){
		elem = form[i];
		switch(elem.type){
			case "text" : case "textarea" : case "file" : case "password" : case "hidden" :
				data += "|"+elem.name+"|"+elem.value;
				break;
			case "select-one" :
				if(elem.selectedIndex!=-1)
					data += "|"+elem.name+"|"+elem.options[elem.selectedIndex].value;
				break;
			case "radio" : case "checkbox" :
				if(elem.checked)
					data += "|"+elem.name+"|"+elem.value;
				break;
		}
	}
	return data;
}


