// JavaScript Document

timeout=0;
function bild(URL, TITEL) 
{
	text = "<html><head><title>ENERGETIX - "+TITEL+"</title><link rel='stylesheet' type='text/css' href='../win.css'></head><body onBlur='self.focus()' topmargin='0' leftmargin='0' bgcolor='#cccccc' leftmargin='0' marginheight='0' marginwidth='0' topmargin='0'";

	if (timeout != 0) 
		text +=" onLoad=\"setTimeout('window.close()', " + timeout*1000 + ");\"";

	text += "><div style='position:absolute; left:0px; top:0px; z-index:1;'><img src='" + URL + "'>";
	if (timeout != 0) 
		text +="<br><font face='arial, helvetica' size='-1'>Preview closes after " + timeout + " seconds.</font>";

	text += "</div></body></html>";

	preview = window.open("", "preview", "height=500, width=620, scrollbars=yes, resizable=yes");
	preview.document.open("text/html","replace");
	preview.document.write(text);
	preview.document.close();
}


function wopen (url,width,height)
{
	newin=window.open(url, 'detail', 'location=no,menubar=no,scrollbars=yes,status=no,titlebar=yes,toolbar=no,resizable=no,width='+width+',height='+height);
	newin.focus();
}


function DoGotoShop()
{
	document.form.modus.value = "goto_shop";
	document.form.modusvalue.value = "";
	document.form.submit();
	return false; 
}

function DoSubmit()
{
	document.form.modus.value = "continue";
	document.form.modusvalue.value = "";
	document.form.submit();
	return false; 
}

function DoSubmit2()
{
	document.contactform.submit();
	return false; 
}


function show_or_hide(id)
{
	if(document.getElementById(id).style.display == 'none')
	{
		document.getElementById(id).style.display = 'block';
	}
	else
	{
		document.getElementById(id).style.display = 'none';
	}
}

function check_CountrySTATES(a)
{
	ID = a.split(",");
	if (ID[1] == 'US')
	{
		document.getElementById('us_STATES').style.display = 'block';
		document.getElementById('us_STATES_label').style.display = 'block';
	}
	else
	{
		document.getElementById('us_STATES').style.display = 'none';
		document.getElementById('us_STATES_label').style.display = 'none';
		document.getElementById('country_State').selectedIndex = 0;
	}
}

