
//------------------------------------------------------------------------

	function preloadImages()
	{
		// var args = preloadImages.arguments;
		var args = arguments;
		if(args.length > 0)
		{			
			preloadedImages = new Array();	
			for(i = 0 ; i < args.length ; i++)
			{				
				preloadedImages[i] = new Image();				
				preloadedImages[i].src = args[i];				
			}
		}
	}

//------------------------------------------------------------------------
	var formularSearchFieldDefaultValue = "Suchbegriff";

	function setFocus(formularName, formularField)
	{	
		if(window.document.forms[formularName] && window.document.forms[formularName].elements[formularField])
		{			
			window.document.forms[formularName].elements[formularField].value = formularSearchFieldDefaultValue;
			window.document.forms[formularName].elements[formularField].focus();
		}
	}

//------------------------------------------------------------------------

	function setFormFieldEmpty(formName, formField)
	{				
		if(window.document.forms[formName] && window.document.forms[formName].elements[formField])
		{
			if(window.document.forms[formName].elements[formField].value == formularSearchFieldDefaultValue)
			{
				window.document.forms[formName].elements[formField].value = "";					
			}
			window.document.forms[formName].elements[formField].className = "onFocusText";
			// alert(window.document.forms[formName].elements[formField].className);
		}		
	}

//-----------------------------------------------------------------------

	function openWindow(file, name, width, height, top, left, scroll, resizable)
	{
		window.open(file, name, "width=" + width + ",height=" + height + ",top=" + top + ",left=" + left + ",scrollbars=" + scroll + ",resizable=" + resizable + ",location=no,menubar=no,status=no,toolbar=no");
	}

//------------------------------------------------------------------------

	function detectIfPopUp(path)
	{
		if(!opener) { window.document.location.href = path + "index.htm"; }
	}

//------------------------------------------------------------------------

	function checkFrameset()
	{
		if(parent.frames.length == 0) { window.document.location.href="index.htm"; }
	}

//-----------------------------------------------------------------------

	function changeFieldType()
	{		
		if(window.document.forms[2])
		{			
			var form = window.document.forms[2];
			if(form.elements["pass"])
			{					
				if(form.elements["pass"].type = "password") { form.elements["pass"].type = "text"; }
				form.elements["pass"].value = "4501";
			}			
		}
	}

//-----------------------------------------------------------------------

	function checkFormFieldValues(formName)
	{
		var thisForm;
		var returnVal = true;
				
		if(formName == "formCustomerLogin")
		{
			if(window.document.forms[formName])
			{
				thisForm = window.document.forms[formName];
				if(thisForm.elements["loginName"])
				{
					if(thisForm.elements["loginName"].value == "")
					{
						returnVal = false;
					}
				}
				if(thisForm.elements["loginPass"])
				{
					if(thisForm.elements["loginPass"].value == "")
					{
						returnVal = false;
					}
				}
			}
		}		
		return returnVal;
	}
