function submittoFrame(url) {
	if(!document.getElementById('contentframe')) {
		var newiframe = document.createElement('iframe');
		var fb = document.createAttribute('frameborder');
		fb.nodeValue = '0';
		var n = document.createAttribute('name');
		n.nodeValue = 'contentframe';
		var fid = document.createAttribute('id');
		fid.nodeValue = 'contentframe';
		
		if(url) {
			var furl = document.createAttribute('src');
			furl.nodeValue = url;
			newiframe.setAttributeNode(furl);
			document.getElementById('content-frame').innerHTML = '';	
		}
		
		newiframe.setAttributeNode(fb);
		newiframe.setAttributeNode(n);
		newiframe.setAttributeNode(fid);
	
		document.getElementById('content-frame').appendChild(newiframe);
	}
	else {
		document.getElementById('contentframe').src = url;	
		}		
}

function show(ste_lfdnr,focus) {

  pfad='/offers/offer_detail.cfm?click=yes&id='+ste_lfdnr+'&channel=industriejob';


  if(focus) pfad += '&focus=1';

  features='top=30,tool-bar=no,location=no,directories=no,menubar=yes,status=yes,scrollbars=yes,resizable=yes,copyhistory=yes';

  if(navigator.appVersion.substring(0,1) > 3 && screen.height > 700) { features+=',width=780,height=580';
    window.open(pfad,'Stellenanzeige'+ste_lfdnr,features);
  } else {
    features+=',fullscreen=no';
    window.open(pfad,'Stellenanzeige'+ste_lfdnr,features);
  }
  
  guterBrowser=true;
  if((navigator.appName=="Netscape")&&(Number(navigator.appVersion.substring(0,1))<5)) guterBrowser=false;
  if(navigator.userAgent.indexOf("Mac")!=-1) guterBrowser=false;;
  if(guterBrowser) {
    if (document.all) {
      if(eval("document.all.id"+ste_lfdnr)) eval("document.all.id"+ste_lfdnr+".style.setAttribute('color','ff8700','false')");
    } else {
      if(document.getElementById("id"+ste_lfdnr)) document.getElementById("id"+ste_lfdnr).style.color = "ff8700";
    }
  }
  
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

	/**
	*	Checks the user specified form cat.
	*/
	function submitFormCat() {
		if(document.cat.mainid.selectedIndex == -1) {
			alert("Bitte wählen Sie ein Berufsfeld.");
		}
		else {
			document.cat.submit();
		}
	}


/**
* Clear value "Stichwort eingeben" before submit frmFreetext
*/
function submitFreetextForm(){
	if(document.frmFreetext.keyword.value == "Stichwort eingeben"){
		document.frmFreetext.keyword.value = "";
	}
	document.frmFreetext.submit();
}

/**
* To emtpy the form field when onFocus
* @param strFormName		The name of the form containing the element
* @param strFormField		The name of the form element to be set empty
*/
function clearValueOnFocus(strFormName, strFormField){
	
	// set form and element objects
	var objForm = document.forms[strFormName];
	var objFormElement = objForm.elements[strFormField];
	
	// empty form element value
	objFormElement.value = "";
}

/**
* To set the value of the form field back if the user din't provided a SearchID
* @param strFormName		The name of the form containing the element
* @param strFormField		The name of the form element to be set empty
* @param strValue		The new value to be set when onBlur 
*/
function setValueOnBlur(strFormName, strFormField, strValue){
	
	// set form and element objects
	var objForm = document.forms[strFormName];
	var objFormElement = objForm.elements[strFormField];
	
	if(objFormElement.value.length == 0){
		// set form element value
		objFormElement.value = strValue;
	}
}