function pageScroll() {
	window.scrollBy(0,50000);
}

function SelectGalleryImage()
{
	options = "width=800,height=600,scrollbars=yes,resizable=yes,status=yes,directories=no,menubar=no,location=no";
	target = "/scripts/cma.dll?mode=popup&action=selectgalleryimage";
	window.open(target, 'Bildauswahl', options);
}

function DoSelectGalleryImage(formname,idimage)
{
	window.opener.parent.ringzentrumcma.document.forms[formname].elements['image'].value = '/files/'+idimage+'.jpg';
	window.opener.parent.ringzentrumcma.document.forms[formname].elements['action'].value = 'insertimage';
	window.opener.parent.ringzentrumcma.document.forms[formname].elements['idimage'].value = idimage;
	window.opener.parent.ringzentrumcma.document.forms[formname].submit();
	window.close();
}

function GetFileName(FromElement, ToElement, FormName)
{
	if(document.forms[FormName].elements[ToElement].value.length > 0)
		return;

	var sPath = document.forms[FormName].elements[FromElement].value;

	if(sPath.length == 0)
		alert('Bitte wählen Sie zuerst eine Datei aus');
	if(sPath.lastIndexOf("\\") > 0)
		document.forms[FormName].elements[ToElement].value = sPath.substr(sPath.lastIndexOf("\\")+1);
}

function SetVar(varname,value,FormName)
{
	document.forms[FormName].elements[varname].value = value;
}

function getPrice(formname,from,price,to)
{
	var iAnzahl = document.forms[formname].elements[from].value;
	var iPrice = 93;
	var iGesamt = (iAnzahl*iPrice);
	document.forms[formname].elements[to].value = 'EUR '+iGesamt;
}

var DHTML = 0, DOM = 0, MS = 0, NS = 0, OP = 0;

function DHTML_init() 
{
	if (window.opera) 
	{
		OP = 1;
	}
	if(document.getElementById) {
		DHTML = 1;
		DOM = 1;
	}
	if(document.all && !OP) {
		DHTML = 1;
		MS = 1;
	}
	if(window.netscape && window.screen && !DOM && !OP) {
		DHTML = 1;
		NS = 1;
	}
}

function getElem(EleID)
{ 
	var Elem;
	if(DOM)
	{
		if(typeof document.getElementById(EleID) == "object")
			Elem = document.getElementById(EleID);
		else
			Elem = void(0);
		
		return(Elem);
  	}
	else if(MS)
	{ 
		if (typeof document.all[EleID] == "object")
      			Elem = document.all[EleID];
		else
			Elem = void(0);
		
		return(Elem);
	}
	else if(NS)
	{
		if (typeof document[EleID] == "object")
			Elem = document[EleID];
		else
			Elem = void(0);
		
		return(Elem);
	}
}

function showMore(id)
{
		DHTML_init();
		if(document.all[id].style.display == "inline")
		{		if(DOM || MS) getElem(id).style.display = "none";
				else if(NS)   getElem(id).display = "none"
		}
		else
		{	if(DOM || MS) getElem(id).style.display = "inline";
			else if(NS)   getElem(id).display = "inline";
		}
}

