function stupidNetscape()
{  
   if (parent.isNetscape)
   {
	  parent.NS = true;
	  parent.menu1.location = "intermediate.htm";
   }
   else
      parent.menu1.location = "e_mail.htm";
}
function stupidNetscape2(fname)
{
   var doc = eval("document."+fname);
   if (doc.mail.value)
      doc.action="mailto:"+doc.mail.value;
}
function position()
{
   if (parent.NS)
   {
      scrollTo(0,10000);
	  parent.NS = false;
   }
}
function stupidNetscape3()
{  
   if (parent.isNetscape)
   {
	  parent.NS = true;
	  parent.menu1.location = "intermediate.htm";
   }
   else
      parent.menu1.location = "e_mail.htm";
}
function sendTo(fname)
{
   if (parent.email != "empty")
   {
      var doc = eval("document."+fname);
      doc.action = "mailto:"+parent.email;
      doc.submit();
	  parent.email = "empty";
   }
}
function printPage(docname)
{
   parent.pageName = docname;
   var endForm = false;
   var i = 0;
   var j = 1;
   while (!endForm)
   {
      if (eval("document.Question.Answer"+j))
	  {
	     parent.answers[i] = eval("document.Question.Answer"+j+".value");
		 i++;
		 j++;
	  }
	  else
	     endForm = true;
   }
   cr(parent.answers);
   document.location = docname+"print.htm";
}
function setValues(dname)
{
   var j = 1;
   var obj = "";
   if (parent.pageName == dname && parent.answers.length > 0)
   {
      for (var i=0;i<parent.answers.length;i++)
      {  
         if (eval("document.Question.Answer"+j))
	     {	
	        obj = eval("document.Question.Answer"+j);
		    obj.value = parent.answers[i];
		    j++;
	     }
	     else
	        break;
      }
   }
}
function cr(obj)
{
   var reg_exp = new RegExp("\\n","g");
   for (var i=0;i<obj.length;i++)
   {
      parent.temp[i] = obj[i].replace(reg_exp,"<br>");
   }
}
