function externalLinks() { 
 if (!document.getElementsByTagName) return; 
 var anchors = document.getElementsByTagName("a"); 
 for (var i=0; i<anchors.length; i++) { 
   var anchor = anchors[i]; 
   relatt=new String(anchor.getAttribute("rel"));
   if (anchor.getAttribute("href") && relatt.indexOf("external")!=-1) 
     anchor.target = "_blank"; 
 } 
}

window.onload = function (e) {
  if (!document.getElementsByTagName) return;
  externalLinks();
}

function show_question(id){
	var fieldset=document.getElementById("main_q" + id)
	 
	if (fieldset.style.display=="block"){
		fieldset.style.display="none";
	}
	else {
		fieldset.style.display="block";
	}
}

function hidden_question(id){
	var fieldset=document.getElementById("main_q" + id)	 
	fieldset.style.display="none";
}

function delete_question(id){
	var fieldset = document.getElementById("main_q" + id);	
	
	document.getElementById("watercycle_q" + id).selectedIndex=0;
	document.getElementById("title_q" + id).value="";
	document.getElementById("answer1_q" + id).value="";
	document.getElementById("answer2_q" + id).value="";
	document.getElementById("answer3_q" + id).value="";
	
	fieldset.style.display="none";
}