/* --------------------------------------------------------------
   $Id: general.js 899 2005-04-29 02:40:57Z hhgag $   

   XT-Commerce - community made shopping
   http://www.xt-commerce.com

   Copyright (c) 2003 XT-Commerce
   Copyright (c) 2007 Sergej Stroh, www.southbridge.de
   --------------------------------------------------------------
   based on: 
   (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
   (c) 2002-2003 osCommerce(general.js,v 1.2 2001/05/20); www.oscommerce.com 
   (c) 2003	 nextcommerce (general.js,v 1.4 2003/08/13); www.nextcommerce.org

   Released under the GNU General Public License 
   --------------------------------------------------------------*/

var selected;
var submitter = null;

function submitFunction() {
    submitter = 1;
}
function popupWindow(url) {
  window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,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 (document.getElementById('payment'[0])) {
    document.getElementById('payment'[buttonSelect]).checked=true;
  } else {
    //document.getElementById('payment'[selected]).checked=true;
  }
}

function rowOverEffect(object) {
  if (object.className == 'moduleRow') object.className = 'moduleRowOver';
}

function rowOutEffect(object) {
  if (object.className == 'moduleRowOver') object.className = 'moduleRow';
}

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')
}

// Create by Southbridge.de
function southbridge_show_me(id,bildname,tauschbild) {
 if(document.getElementById(id).style.display = 'none'){
		document.getElementById(id).style.display = 'block';
 }
	document.images[bildname].src=tauschbild;
}

function southbridge_hide_me(id,bildname,tauschbild) {
 if(document.getElementById(id).style.display = 'block'){
		document.getElementById(id).style.display = 'none';
 }
 document.images[bildname].src=tauschbild;
}

/* tooltip */

tool = null;
document.onmousemove = update_tip;

function show_tip(id) {
	tool = document.getElementById(id);
	tool.style.display = "block"
}
// Position abfragen
function update_tip(pos) {
	x = (document.all) ? window.event.x + document.body.scrollLeft : pos.pageX;
	y = (document.all) ? window.event.y + document.body.scrollTop  : pos.pageY;
	if (tool != null) {
		tool.style.left = (x - 100) + "px";
		tool.style.top 	= (y + 15) + "px";
	}
}
// Ausblenden
function hide_tip() {
	tool.style.display = "none";
}

// neues Fenster
function openInfoWindow(URL,Name,features) { 
  window.open(URL,Name,features);
}

