<!DOCTYPE html><html><head>	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">	<style type="text/css">		body {	  font-family: Tahoma, Verdana, Arial;	  color: orange;	  font-size: 150%;	}		.clearfix:before, .clearfix:after { 		content: "\0020"; 		display: block; 		height: 0; 		overflow: hidden; 	}		.clearfix:after { 		clear: both; 	}		.clearfix { 		zoom: 1; 	}		input {		margin: 7px 4px;		}		button {		margin: 7px 4px;	}		.highlight {		border: 2px solid orange;					}		.bracket {		border: 2px solid black;		border-top-width: 0;		border-bottom-width: 0;		border-radius: 10px;		padding: 5pt;		position: relative;		display: inline-block;			}			</style>	</head><body><input type="hidden" value="0" id="theValue" /><div id="block00"> </div><p id="express"> </p><button type="button" name="output" onclick="output()">query</button><button type="button" name="jsonOutput" onclick="jsonOutput()">suchen</button><script>document.getElementById("block00").innerHTML = "<div id=\"my0Div\" class=\"whole00\" value=\"0\"><select class=\"dropDown00\" onchange=\"setName('00',this.value);nestedStructure(this.value,this.className);\"><option value=\"Attribute\" disabled>Attribute</option><option value=\"Untertitel\">Untertitel</option><option value=\"Autor\">Autor</option><option value=\"Veröffentlichungsdatum\">Veröffentlichungsdatum</option><option value=\"Titel\">Titel</option><option value=\"Veröffentlichungsort\">Veröffentlichungsort</option><option value=\"Text-ID\">Text-ID</option><option value=\"Korpus-ID\">Korpus-ID</option><option value=\"Thema\">Thema</option><option value=\"()\">()</option></select><select class=\"polar00\"><option value=\"=\">=</option><option value=\"!=\">!=</option></select><input type=\"text\" class=\"change00\" onkeyup=\"verify('00',this.value)\" /><button type=\"button\" name=\"und00\" onclick=\"addRow('00','and');value=buttonClick('und');\" disabled=\"true\" >und</button><button type=\"button\" name=\"oder00\" onclick=\"addRow('00','or');value=buttonClick('oder');\" disabled=\"true\" >oder</button><button type=\"button\" name=\"entfernen\" disabled=\"true\">entfernen</button></div>";/*	add one row*/function addRow(degree,rel) {	var wholeClassName = "whole"+degree;	var dropDownClassName = "dropDown"+degree;	var changeClassName = "change"+degree;	var polarClassName = "polar"+degree;	var undClassName = "und"+degree;	var oderClassName = "oder"+degree;		var buttonUnd = document.getElementsByName(undClassName);	var buttonOder = document.getElementsByName(oderClassName);		if(rel==="and") {		buttonUnd[buttonUnd.length-1].setAttribute("class","highlight");	} 	else if(rel==="or") {		buttonOder[buttonOder.length-1].setAttribute("class","highlight");	}		var valueEle = document.getElementById('theValue');	var num = (valueEle.value -1)+ 2;	valueEle.value = num;	var divIdName = "my"+num+"Div";	var newdiv = document.createElement('div');	newdiv.setAttribute("id",divIdName);	newdiv.setAttribute("class", "whole"+degree);	newdiv.innerHTML = "<select class=\""+dropDownClassName+"\" onchange=\"setName(\'"+degree+"\',this.value);nestedStructure(this.value,this.className);\"><option value=\"Attribute\" disabled>Attribute</option><option value=\"Untertitel\">Untertitel</option><option value=\"Autor\">Autor</option><option value=\"Veröffentlichungsdatum\">Veröffentlichungsdatum</option><option value=\"Titel\">Titel</option><option value=\"Veröffentlichungsort\">Veröffentlichungsort</option><option value=\"Text-ID\">Text-ID</option><option value=\"Korpus-ID\">Korpus-ID</option><option value=\"Thema\">Thema</option><option value=\"()\">()</option></select><select class=\""+polarClassName+"\"><option value=\"=\">=</option><option value=\"!=\">!=</option></select><input type=\"text\" class=\""+changeClassName+"\" onkeyup=\"verify(\'"+degree+"\',this.value)\"><button type=\"button\" name=\""+undClassName+"\" onclick=\"addRow(\'"+degree+"\','and');value=buttonClick('und');\" disabled=\"true\">und</button><button type=\"button\" name=\""+oderClassName+"\" onclick=\"addRow(\'"+degree+"\','or');value=buttonClick('oder');\" disabled=\"true\">oder</button><button type=\"button\" name=\"entfernen\" onclick=\"del(\'"+divIdName+"\',\'"+degree+"\')\">entfernen</button>";			if(!endsWith(degree,"c")) {		if(buttonUnd.length<1) {			var block = document.createElement('div');			block.setAttribute("id","block"+degree);		}		else {			var block = document.getElementById("block"+degree);		}		block.appendChild(newdiv);		var oldPolar = "polar"+(degree.charAt(0)-1)+degree.charAt(1);		var oldPolarSel = document.getElementsByClassName(oldPolar);		if(oldPolarSel.length>0) {			var oldBlock = document.getElementById("block"+(degree.charAt(0)-1)+degree.charAt(1));			oldBlock.appendChild(block);		}		var oldPolarB = "polar"+(degree.charAt(0)-1)+degree.charAt(1)+"c";		var oldPolarSelB = document.getElementsByClassName(oldPolarB);		if(oldPolarSelB.length>0) {					var d1 = degree.charAt(0)-1;			var d2 = degree.charAt(1);			var oldBlockB = document.getElementById("block"+d1+d2);			while(!oldBlockB) {				d2--;				oldBlockB = document.getElementById("block"+d1+d2);			}  			oldBlockB.appendChild(block);		}		margin(degree,block.id);			}	else {		var oldPolar="polar"+degree.charAt(0)+(degree.charAt(1)-1);		var oldPolarSel = document.getElementsByClassName(oldPolar);		if(oldPolarSel.length>0) {			var oldBlock = document.getElementById("block"+(degree.charAt(0)+(degree.charAt(1)-1)));			oldBlock.appendChild(newdiv);		}		var oldPolarB = "polar"+degree.charAt(0)+(degree.charAt(1)-1)+"c";		var oldPolarSelB = document.getElementsByClassName(oldPolarB);		if(oldPolarSelB.length>0) {			var d1 = degree.charAt(0);			var d2 = degree.charAt(1)-1;			while(!oldBlockB) {				d2--;				oldBlockB = document.getElementById("block"+d1+d2);			}  			oldBlockB.appendChild(newdiv);		}	}	 	buttonUnd[buttonUnd.length-2].disabled=true;	buttonOder[buttonUnd.length-2].disabled=true; 	}function endsWith(str, suffix) {    return str.indexOf(suffix, str.length - suffix.length) !== -1;}/*margin and bracket for nested structure*/function margin(degree,block) {	var num = degree.charAt(0);	var margin = 0+num*60;	if(margin>0) {		var block = document.getElementById(block);		var x = "0 0 0 "+margin+"px";		block.style.margin=x;		block.setAttribute("class","bracket");	}}/*verify the input text, if it not emptry, enable the "und and "oder" button*/function verify(degree,val) {	var buttonUnd = document.getElementsByName("und"+degree);	var buttonOder = document.getElementsByName("oder"+degree);		indexUnd = buttonUnd.length-1;	if(val.length>0) {		buttonUnd[indexUnd].disabled=false;		buttonOder[indexUnd].disabled=false;	}	else{		buttonUnd[indexUnd].disabled=true;		buttonOder[indexUnd].disabled=true;	}}/*connect the text input with options in select*/function setName(degree,val) {	var felds = document.getElementsByClassName("change"+degree);	index = felds.length-1;		if(val==="Veröffentlichungsdatum") {		felds[index].type="date";	}		else {		felds[index].type="text";	}	felds[index].name=val;		}/*set operation value if the corresponding button is clicked.*/function buttonClick(choice) {	var s = "";	if(choice=="und") {		s = "operation:and";	}	else if(choice=="oder") {		s = "operation:or";	}	return s;}/*	delete one row.*/function del(divNum,degree) {	var block = document.getElementById("block"+degree);	var olddiv = document.getElementById(divNum);	olddiv.parentNode.removeChild(olddiv);	var buttonEntfernen = document.getElementsByName("entfernen");	var currentEntfernen = buttonEntfernen[buttonEntfernen.length-1];	var buttonUndLast = currentEntfernen.parentNode.childNodes[3];	var buttonOderLast = currentEntfernen.parentNode.childNodes[4];	buttonUndLast.disabled=false;	buttonOderLast.disabled=false;	buttonUndLast.removeAttribute("class", "highlight");	buttonOderLast.removeAttribute("class", "highlight");	buttonUndLast.value="";	buttonOderLast.value="";		var dropDown = document.getElementsByClassName("dropDown"+degree);	//alert(dropDown.length);	if(dropDown.length==0) {		var oldDropDownA = document.getElementsByClassName("dropDown"+(degree.charAt(0)-1)+degree.charAt(1));		indexOldDropDownA = oldDropDownA.length-1;		if(indexOldDropDownA>=0) {			oldDropDownA[indexOldDropDownA].disabled=false;		}		var oldDropDownB = document.getElementsByClassName("dropDown"+(degree.charAt(0)-1)+degree.charAt(1)+"c");		indexOldDropDownB = oldDropDownB.length-1;		if(indexOldDropDownB>=0) {			oldDropDownB[indexOldDropDownB].disabled=false;		}			}		var buttonUnd = document.getElementsByName("und"+degree);	if(buttonUnd.length==0) {		if(block) {			block.parentNode.removeChild(block);		}		if(endsWith(degree,"c")) {					var oldDegree=degree.charAt(0)+(degree.charAt(1)-1);					var currentButtonEntfernen = document.getElementsByName("entfernen");			var currentEntfernen = currentButtonEntfernen[currentButtonEntfernen.length-1];			var currentWhole = currentEntfernen.parentNode.className;						var currentDegree = currentWhole.replace("whole", "");						var under = oldDegree.charAt(0)-1+1;			var upper = currentDegree.charAt(0)-1+1;						var under2 = oldDegree.charAt(1)-1+1;			var upper2 = currentDegree.charAt(1)-1+1;						for (k=under;k<=upper;k++) {				for (l=under2;l<=upper2;l++) {					var d = ""+k+l;										var buttonUndNestedA = document.getElementsByName("und"+d);					var buttonOderNestedA = document.getElementsByName("oder"+d);					 					indexNestedA = buttonUndNestedA.length-1;										var buttonUndNestedB = document.getElementsByName("und"+d+"c");					var buttonOderNestedB = document.getElementsByName("oder"+d+"c"); 					indexNestedB = buttonUndNestedB.length-1;										if(indexNestedA >= 0) {						buttonUndNestedA[indexNestedA].disabled = false;						buttonOderNestedA[indexNestedA].disabled = false;						buttonUndNestedA[indexNestedA].removeAttribute("class", "highlight");						buttonOderNestedA[indexNestedA].removeAttribute("class", "highlight");						buttonUndNestedA[indexNestedA].value="";						buttonOderNestedA[indexNestedA]="";																				}					if(indexNestedB >= 0){						buttonUndNestedB[indexNestedB].disabled = false;						buttonOderNestedB[indexNestedB].disabled = false;						buttonUndNestedB[indexNestedB].removeAttribute("class", "highlight");						buttonOderNestedB[indexNestedB].removeAttribute("class", "highlight");						buttonUndNestedB[indexNestedB].value="";						buttonOderNestedB[indexNestedB]="";						}								}							} 		}			}	}/*	for the () structure.*/function nestedStructure(value,className) {	var oldDegree = className.replace("dropDown", "");	var polarSel = document.getElementsByClassName("polar"+oldDegree);	var felds = document.getElementsByClassName("change"+oldDegree);		if(value==="()") {				var nestedAddNum = oldDegree.charAt(0)-1+2;		var nestedDegree = nestedAddNum+oldDegree.charAt(1);		var backAddNum = oldDegree.charAt(1)-1+2;		var backDegree = oldDegree.charAt(0)+backAddNum+"c";				var dropDown = document.getElementsByClassName("dropDown"+oldDegree);		polarSel[polarSel.length-1].style.visibility="hidden";		felds[felds.length-1].style.visibility="hidden";		dropDown[dropDown.length-1].disabled=true;								var buttonOldUnd = document.getElementsByName("und"+oldDegree);		var buttonOldOder = document.getElementsByName("oder"+oldDegree);		var buttonEntfernen = document.getElementsByName("entfernen");		buttonOldUnd[buttonOldUnd.length-1].disabled=false;		buttonOldOder[buttonOldOder.length-1].disabled=false;						/*		special addRow function for "und" button in row with bracket		*/				buttonOldUnd[buttonOldUnd.length-1].onclick=function(){						buttonOldUnd[buttonOldUnd.length-1].value="operation:and";			buttonOldUnd[buttonOldUnd.length-1].setAttribute("class","highlight");			var currentButtonEntfernen = document.getElementsByName("entfernen");			var currentEntfernen = currentButtonEntfernen[currentButtonEntfernen.length-1];			var currentWhole = currentEntfernen.parentNode.className;						var currentDegree = currentWhole.replace("whole", "");						var under = oldDegree.charAt(0)-1+1;			var upper = currentDegree.charAt(0)-1+1;						var under2 = oldDegree.charAt(1)-1+1;			var upper2 = currentDegree.charAt(1)-1+1;						for (k=under;k<=upper;k++) {				for (l=under2;l<=upper2;l++) {					var d = ""+k+l;										var buttonUndNestedA = document.getElementsByName("und"+d);					var buttonOderNestedA = document.getElementsByName("oder"+d);					 					indexNestedA = buttonUndNestedA.length-1;										var buttonUndNestedB = document.getElementsByName("und"+d+"c");					var buttonOderNestedB = document.getElementsByName("oder"+d+"c"); 					indexNestedB = buttonUndNestedB.length-1;										if(indexNestedA >= 0) {						buttonUndNestedA[indexNestedA].disabled = true;						buttonOderNestedA[indexNestedA].disabled = true;								}					if(indexNestedB >= 0){						buttonUndNestedB[indexNestedB].disabled = true;						buttonOderNestedB[indexNestedB].disabled = true;						}								}							} 					addRow(backDegree,"rel");										}				/*		special addRow function for "oder" button in row with bracket		*/				buttonOldOder[buttonOldOder.length-1].onclick=function(){			buttonOldOder[buttonOldOder.length-1].value="operation:or";			buttonOldOder[buttonOldOder.length-1].setAttribute("class","highlight");						var currentButtonEntfernen = document.getElementsByName("entfernen");			var currentEntfernen = currentButtonEntfernen[currentButtonEntfernen.length-1];			var currentWhole = currentEntfernen.parentNode.className;						var currentDegree = currentWhole.replace("whole", "");						var under = oldDegree.charAt(0)-1+1;			var upper = currentDegree.charAt(0)-1+1;						var under2 = oldDegree.charAt(1)-1+1;			var upper2 = currentDegree.charAt(1)-1+1;						for (k=under;k<=upper;k++) {				for (l=under2;l<=upper2;l++) {					var d = ""+k+l;										var buttonUndNestedA = document.getElementsByName("und"+d);					var buttonOderNestedA = document.getElementsByName("oder"+d);					 					indexNestedA = buttonUndNestedA.length-1;										var buttonUndNestedB = document.getElementsByName("und"+d+"c");					var buttonOderNestedB = document.getElementsByName("oder"+d+"c"); 					indexNestedB = buttonUndNestedB.length-1;										if(indexNestedA >= 0) {						buttonUndNestedA[indexNestedA].disabled = true;						buttonOderNestedA[indexNestedA].disabled = true;								}					if(indexNestedB >= 0){						buttonUndNestedB[indexNestedB].disabled = true;						buttonOderNestedB[indexNestedB].disabled = true;						}								}							} 						addRow(backDegree,"rel");							}				/*		special del function for "del" button in row with bracket		*/				buttonEntfernen[buttonEntfernen.length-1].onclick=function(){					var block = document.getElementById("block"+nestedDegree);			if(block) {				block.parentNode.removeChild(block);			}						if(buttonOldUnd.length==1) {				var oldBlock = document.getElementById("block"+oldDegree);				if(oldBlock) {					oldBlock.parentNode.removeChild(oldBlock);				}				var oldDropDownA = document.getElementsByClassName("dropDown"+(oldDegree.charAt(0)-1)+oldDegree.charAt(1));				indexOldDropDownA = oldDropDownA.length-1;				if(indexOldDropDownA>=0) {					oldDropDownA[indexOldDropDownA].disabled=false;				}				var oldDropDownB = document.getElementsByClassName("dropDown"+(oldDegree.charAt(0)-1)+oldDegree.charAt(1)+"c");				indexOldDropDownB = oldDropDownB.length-1;				if(indexOldDropDownB>=0) {					oldDropDownB[indexOldDropDownB].disabled=false;				}							}						var divOld = document.getElementsByClassName("whole"+oldDegree);			divOld[divOld.length-1].parentNode.removeChild(divOld[divOld.length-1]);						var currentButtonEntfernen = document.getElementsByName("entfernen");			var currentEntfernen = currentButtonEntfernen[currentButtonEntfernen.length-1];			var buttonUndLast = currentEntfernen.parentNode.childNodes[3];			var buttonOderLast = currentEntfernen.parentNode.childNodes[4];			buttonUndLast.disabled=false;			buttonOderLast.disabled=false;			buttonUndLast.removeAttribute("class", "highlight");			buttonOderLast.removeAttribute("class", "highlight");			buttonUndLast.value="";			buttonOderLast.value="";										}						addRow(nestedDegree,'rel');				}	else {		polarSel[polarSel.length-1].style.visibility="visible";		felds[felds.length-1].style.visibility="visible";			}}/*	output json-object	e.g	{"type":"korap:docGroup","operation":"operation:and","operands":[{"type":"korap:docGroup","operation":"operation:and","operands":[{"type":"korap:docGroup","operation":"operation:and","operands":[{"type":"korap:doc","key":"Autor","value":"Thomas","match":"match:eq"},{"type":"korap:doc","key":"Thema","value":"Musik","match":"match:eq"}]},{"type":"korap:docGroup","operation":"operation:and","operands":[{"type":"korap:doc","key":"Autor","value":"Sebastian","match":"match:eq"},{"type":"korap:doc","key":"Thema","value":"Poliktik","match":"match:eq"}]}]},{"type":"korap:doc","key":"Veröffentlichungsdatum","value":"2014-10-01","match":"match:ne"}]}*/function jsonOutput() {	query = jsonOutputOneDegree('00');	alert(JSON.stringify(query));}function jsonOutputOneDegree(degree) {	var polar = document.getElementsByClassName("polar"+degree);	var selList = document.getElementsByClassName("dropDown"+degree);	var felds = document.getElementsByClassName("change"+degree);	var undButton = document.getElementsByName("und"+degree);	var oderButton = document.getElementsByName("oder"+degree);		var query = {type : "korap:docGroup", operation :"", operands : ""};	var operand1 = {type : "korap:doc", key : "", value : "", match : ""};	var operand2 = {type : "korap:doc", key : "", value : "", match : ""};	var operandsList = [];		var sel1 = selList[0].options[selList[0].selectedIndex].value;	var polarSel1 = polar[0].options[polar[0].selectedIndex].value;	if(sel1!="()") {					operand1.key=sel1;		operand1.value=felds[0].value;		if(polarSel1=="=") {			operand1.match="match:eq";		}		else {			operand1.match="match:ne";		}		}	else {		var newDegree=(degree.charAt(0)-1+2)+degree.charAt(1);		operand1 = jsonOutputOneDegree(newDegree);	}	query = operand1;	if(felds.length>1) {		var i=1;		while(i<felds.length) {			query = jsonOutputAdd(query,i,degree);			i++;		}		}		var backDegree = degree.charAt(0)+(degree.charAt(1)-1+2)+"c";	var backPolar = document.getElementsByClassName("polar"+backDegree);	if(backPolar.length>0) {		var queryBack = jsonOutputOneDegree(backDegree);		query = jsonOutputBind(query,queryBack,backDegree);	}		return query}function jsonOutputBind(query1, query2,degree) {	var queryAll = {type : "korap:docGroup", operation :"", operands : ""};	var operandsList = [];		operandsList.push(query1);	operandsList.push(query2);	queryAll.operands = operandsList;		var oldDegreeA=degree.charAt(0)+(degree.charAt(1)-1);	var oldDegreeB=degree.charAt(0)+(degree.charAt(1)-1)+"c";		var undOldButtonA = document.getElementsByName("und"+oldDegreeA);	var oderOldButtonA = document.getElementsByName("oder"+oldDegreeA);	var idexOldButtonA = undOldButtonA.length-1;		var undOldButtonB = document.getElementsByName("und"+oldDegreeB);	var oderOldButtonB = document.getElementsByName("oder"+oldDegreeB);	var idexOldButtonB = undOldButtonB.length-1;		if(idexOldButtonA>=0) {				if (undOldButtonA[idexOldButtonA].value!="") {			queryAll.operation = undOldButtonA[idexOldButtonA].value;		}		else if(oderOldButtonA[idexOldButtonA].value!="") {			queryAll.operation = oderOldButtonA[idexOldButtonA].value;		}	}	if(idexOldButtonB>=0) {		if (undOldButtonB[idexOldButtonB].value!="") {			queryAll.operation = undOldButtonB[idexOldButtonB].value;		}		else if(oderOldButtonB[idexOldButtonB].value!="") {			queryAll.operation = oderOldButtonB[idexOldButtonB].value;		}	}			return queryAll;		}function jsonOutputAdd(query,i,degree) {	var polar = document.getElementsByClassName("polar"+degree);	var selList = document.getElementsByClassName("dropDown"+degree);	var felds = document.getElementsByClassName("change"+degree);	var undButton = document.getElementsByName("und"+degree);	var oderButton = document.getElementsByName("oder"+degree);		var queryNext = {type : "korap:docGroup", operation :"", operands : ""};	var operandNext = {type : "korap:doc", key : "", value : "", match : ""};	var operandsListNext = [];	operandsListNext.push(query);		if(i>=1) {		if (undButton[i-1].value!="") {			queryNext.operation = "operation:and";		}		else if(oderButton[i-1].value!="") {			queryNext.operation = "operation:or";		}	}			var sel = selList[i].options[selList[i].selectedIndex].value;	var polarSel = polar[i].options[polar[i].selectedIndex].value;		if(sel!="()") {					operandNext.key=sel;		operandNext.value=felds[i].value;		if(polarSel=="=") {			operandNext.match="match:eq";		}		else {			operandNext.match="match:ne";		}		}	else {		var newDegree=(degree.charAt(0)-1+2)+degree.charAt(1);		operandNext = jsonOutputOneDegree(newDegree);	}		operandsListNext.push(operandNext);	queryNext.operands = operandsListNext;				//alert(JSON.stringify(queryNext));	return queryNext;		}/*output as string, eg. Autor=Thomas&Thema=Musik&(Autor=Sebastian&Thema=Poliktik)&Veröffentlichungsdatum!=2014-10-01*/function output() {	s=outputOneDegree("00");	document.getElementById("express").innerHTML=s;	}function outputOneDegree(degree) {		var s = "";		var polar = document.getElementsByClassName("polar"+degree);	var selList = document.getElementsByClassName("dropDown"+degree);	var felds = document.getElementsByClassName("change"+degree);	var undButton = document.getElementsByName("und"+degree);	var oderButton = document.getElementsByName("oder"+degree);			var i=0;			while(i<felds.length) {		if(i>=1) {			if (undButton[i-1].value!="") {				s+=" "+"&"+" ";			}			else if(oderButton[i-1].value!="") {				s+=" "+"||"+" ";;			}		}		else {			var oldDegreeA=degree.charAt(0)+(degree.charAt(1)-1);			var oldDegreeB=degree.charAt(0)+(degree.charAt(1)-1)+"c";			var undOldButtonA = document.getElementsByName("und"+oldDegreeA);			var oderOldButtonA = document.getElementsByName("oder"+oldDegreeA);			var idexOldButtonA = undOldButtonA.length-1;						var undOldButtonB = document.getElementsByName("und"+oldDegreeB);			var oderOldButtonB = document.getElementsByName("oder"+oldDegreeB);			var idexOldButtonB = undOldButtonB.length-1;			if(idexOldButtonA>=0) {				if (undOldButtonA[idexOldButtonA].value!="") {					s+=" "+"&"+" ";				}				else if(oderOldButtonA[idexOldButtonA].value!="") {					s+=" "+"||"+" ";				}			}			if(idexOldButtonB>=0) {				if (undOldButtonB[idexOldButtonB].value!="") {					s+=" "+"&"+" ";				}				else if(oderOldButtonB[idexOldButtonB].value!="") {					s+=" "+"||"+" ";				}			}		}		var sel = selList[i].options[selList[i].selectedIndex].value;		var polarSel = polar[i].options[polar[i].selectedIndex].value;		if(sel!="()") {						s+=sel+polarSel;			s += felds[i].value;			}		else{			s+="(";			var newDegree=(degree.charAt(0)-1+2)+degree.charAt(1);			s+=outputOneDegree(newDegree);			s+=")";		}		i++;						}		var backDegree = degree.charAt(0)+(degree.charAt(1)-1+2)+"c";	var backPolar = document.getElementsByClassName("polar"+backDegree);	if(backPolar.length>0) {		s+=outputOneDegree(backDegree);	}		return s;				}</script></body>