function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		mi_company_over = newImage("images/company-over.gif");
		mi_jobs_over = newImage("images/jobs-over.gif");
		mi_contact_over = newImage("images/contact-over.gif");
		mi_location_over = newImage("images/location-over.gif");
		mi_imprint_over = newImage("images/imprint-over.gif");
		mi_partner_over = newImage("images/partner-over.gif");
		preloadFlag = true;
	}
}

function checkTextLength(input_field, limit, status_field_id,word1,word2) {
	if (input_field.value.length > limit)
		input_field.value = input_field.value.substring(0, limit);
		document.getElementById(status_field_id).firstChild.nodeValue=word1+' '+(limit-input_field.value.length)+' '+word2;
}

function myOpen(file_name) {
  window.location.href = file_name; 
}

function outlineSimple(id) {
 if(document.getElementById(id).style.display == 'none') {
  document.getElementById(id).style.display = 'block';
 }
 else {
  document.getElementById(id).style.display = 'none';
 }
}
