function showhidefield(action, styleID)
{
		if (action=="show"){displaytype="block";} else if (action=="hide"){displaytype="none";}

    
		if (styleID.substring(0,6)=="group_")		{

		  		if (styleID == "group_All"){
		  			
						document.getElementById("ef_category").style.display = displaytype;
						func_group_All(displaytype);
						//reset form value
						document.supportform.category_2.options[0].selected=false;
						document.supportform.category.options[0].selected=true;					
		  		}
		  		  else if (styleID == "tp_category"){
						document.getElementById("tp_category").style.display = displaytype;
						func_group_All(displaytype);
						//reset form value
						document.supportform.category.options[0].selected=false;
						document.supportform.category_2.options[0].selected=true;		  		  			  		  	
		  		}
			  		else if (styleID == "group_ef_categ1"){
						func_group_All("none");
						func_group_ef_categ1(displaytype);
					}
			  		else if (styleID == "group_ef_categ2"){
						func_group_All("none");
						func_group_ef_categ2(displaytype);
					}
			  		else if (styleID == "group_ef_categ3"){
						func_group_All("none");
						func_group_ef_categ3(displaytype);
					}
			  		else if (styleID == "group_ef_categ4"){
						func_group_All("none");
						func_group_ef_categ4(displaytype);
					}
			  		else if (styleID == "group_ef_categ5"){
						func_group_All("none");
						func_group_ef_categ5(displaytype);
					}
			  		else if (styleID == "group_ef_categ6"){
						func_group_All("none");
						func_group_ef_categ6(displaytype);
					}
			  		else if (styleID == "group_ef_categ7"){
						func_group_All("none");
						func_group_ef_categ7(displaytype);
					}
			  		else if (styleID == "group_ef_categ8"){
						func_group_All("none");
						func_group_ef_categ8(displaytype);
					}
			  		else if (styleID == "group_tp_categ1"){
						func_group_All("none");
						func_group_tp_categ1(displaytype);
					}
			  		else if (styleID == "group_tp_categ2"){
						func_group_All("none");
						func_group_tp_categ2(displaytype);
					}
			  		else if (styleID == "group_tp_categ3"){
						func_group_All("none");
						func_group_tp_categ3(displaytype);
					}
			  		else if (styleID == "group_mailBouncing"){
						func_group_mailBouncing(displaytype);
					}
			  		else if (styleID == "group_ealerts"){
						document.getElementById("ef_category").style.display = "none";
						document.getElementById("tp_category").style.display = "none";
						func_group_All("none");
						func_group_ealerts(displaytype);
						//reset form value
						document.supportform.category.options[0].selected=true;
						document.supportform.category_2.options[0].selected=true;
					}
			  		else if (styleID == "group_directories"){
						document.getElementById("ef_category").style.display = "none";
						document.getElementById("tp_category").style.display = "none";
						func_group_All("none");
						func_group_directories(displaytype);
						//reset form value
						document.supportform.category.options[0].selected=true;
						document.supportform.category_2.options[0].selected=true;

					}
			  		else if (styleID == "group_webmail"){
						document.getElementById("ef_category").style.display = "none";
						document.getElementById("tp_category").style.display = "none";
						func_group_All("none");
						func_group_webmail(displaytype);
						//reset form value
						document.supportform.category.options[0].selected=true;
						document.supportform.category_2.options[0].selected=true;
						
					}
			  		else if (styleID == "group_antispam"){
						document.getElementById("ef_category").style.display = "none";
						document.getElementById("tp_category").style.display = "none";
						func_group_All("none");
						func_group_antispam(displaytype);
						//reset form value
						document.supportform.category.options[0].selected=true;
						document.supportform.category_2.options[0].selected=true;
						
					}					
			  		else if (styleID == "group_domain"){
						document.getElementById("ef_category").style.display = "none";
						document.getElementById("tp_category").style.display = "none";
						func_group_All("none");
						func_group_domain(displaytype);
						//reset form value
						document.supportform.category.options[0].selected=true;
						document.supportform.category_2.options[0].selected=true;
						
					}
			  		else if (styleID == "group_concall"){
						document.getElementById("ef_category").style.display = "none";
						document.getElementById("tp_category").style.display = "none";
						func_group_All("none");
						func_group_concall(displaytype);
						//reset form value
						document.supportform.category.options[0].selected=true;
						document.supportform.category_2.options[0].selected=true;
						
					}
			  		else if (styleID == "group_callcards"){
						document.getElementById("ef_category").style.display = "none";
						document.getElementById("tp_category").style.display = "none";
						func_group_All("none");
						func_group_callcards(displaytype);
						//reset form value
						document.supportform.category.options[0].selected=true;
						document.supportform.category_2.options[0].selected=true;
						
					}
			  		else if (styleID == "group_sms"){
						document.getElementById("ef_category").style.display = "none";
						document.getElementById("tp_category").style.display = "none";
						func_group_All("none");
						func_group_sms(displaytype);
						//reset form value
						document.supportform.category.options[0].selected=true;
						document.supportform.category_2.options[0].selected=true;
					}
			  		else if (styleID == "group_sms_error"){
						func_group_sms_error(displaytype);
					}
		}

		else if (styleID!="")
		{
					document.getElementById("ef_category").style.display = "none";
					document.getElementById("tp_category").style.display = "none";
					func_group_All("none");
					//reset form value
					document.supportform.category.options[0].selected=true;
					document.supportform.category_2.options[0].selected=true;
					document.getElementById(styleID).style.display = displaytype;

		}

}

function func_group_All(displaytype)
{
		func_group_ef_categ1(displaytype);
		func_group_ef_categ2(displaytype);
		func_group_ef_categ3(displaytype);
		func_group_ef_categ4(displaytype);
		func_group_ef_categ5(displaytype);
		func_group_ef_categ6(displaytype);
		func_group_ef_categ7(displaytype);
		func_group_ef_categ8(displaytype);
		func_group_tp_categ1(displaytype);
		func_group_tp_categ2(displaytype);
		func_group_tp_categ3(displaytype);		
		func_group_mailBouncing(displaytype);
		func_group_ealerts(displaytype);
		func_group_directories(displaytype);
		func_group_webmail(displaytype);
		func_group_antispam(displaytype);
		func_group_domain(displaytype);
		func_group_concall(displaytype);
		func_group_callcards(displaytype);
		func_group_sms(displaytype);
		func_group_sms_error(displaytype);
}


function func_group_submit(displaytype)
{
	  document.getElementById("submit1").style.display = displaytype;
	  document.getElementById("submit2").style.display = displaytype;
	  document.getElementById("submit3").style.display = displaytype;
	  document.getElementById("submit4").style.display = displaytype;
	  document.getElementById("submit5").style.display = displaytype;
}

function func_group_ef_categ1(displaytype)
{
	  document.getElementById("ef_problem_1").style.display = displaytype;
	  document.getElementById("problemdesc").style.display = displaytype;
	  func_group_submit(displaytype);
	  //reset form value
	  document.supportform.ef_problem_1.options[0].selected=true;
	  document.supportform.problemdesc.value="";
}

function func_group_ef_categ2(displaytype)
{
	  document.getElementById("ef_problem_2").style.display = displaytype;
	  document.getElementById("problemdesc").style.display = displaytype;
	  func_group_submit(displaytype);
	  //reset form value
	  document.supportform.ef_problem_2.options[0].selected=true;
	  document.supportform.problemdesc.value="";
}

function func_group_ef_categ3(displaytype)
{
	  document.getElementById("ef_problem_3").style.display = displaytype;
	  document.getElementById("problemdesc").style.display = displaytype;
	  func_group_submit(displaytype);
	  //reset form value
	  document.supportform.ef_problem_3.options[0].selected=true;
	  document.supportform.problemdesc.value="";
}

function func_group_ef_categ4(displaytype)
{
	  document.getElementById("ef_problem_4").style.display = displaytype;
	  document.getElementById("problemdesc").style.display = displaytype;
	  func_group_submit(displaytype);
	  //reset form value
	  document.supportform.ef_problem_4.options[0].selected=true;
	  document.supportform.problemdesc.value="";
}

function func_group_ef_categ5(displaytype)
{
	  document.getElementById("ef_problem_5").style.display = displaytype;
	  document.getElementById("problemdesc").style.display = displaytype;
	  func_group_submit(displaytype);
	  //reset form value
	  document.supportform.ef_problem_5.options[0].selected=true;
	  document.supportform.problemdesc.value="";
}

function func_group_ef_categ6(displaytype)
{
	  document.getElementById("ef_problem_6").style.display = displaytype;
	  document.getElementById("problemdesc").style.display = displaytype;
	  func_group_submit(displaytype);
	  //reset form value
	  document.supportform.ef_problem_6.options[0].selected=true;
	  document.supportform.problemdesc.value="";
}

function func_group_ef_categ7(displaytype)
{
	  document.getElementById("ef_problem_7").style.display = displaytype;
	  document.getElementById("problemdesc").style.display = displaytype;
	  func_group_submit(displaytype);
	  //reset form value
	  document.supportform.ef_problem_7.options[0].selected=true;
	  document.supportform.problemdesc.value="";
}

function func_group_ef_categ8(displaytype)
{
	  document.getElementById("ef_problem_8").style.display = displaytype;
	  document.getElementById("problemdesc").style.display = displaytype;
	  func_group_submit(displaytype);
	  //reset form value
	  document.supportform.ef_problem_8.options[0].selected=true;
	  document.supportform.problemdesc.value="";
}

function func_group_tp_categ1(displaytype)
{
	  document.getElementById("tp_problem_1").style.display = displaytype;
	  document.getElementById("problemdesc").style.display = displaytype;
	  func_group_submit(displaytype);
	  //reset form value
	  document.supportform.tp_problem_1.options[0].selected=true;
	  document.supportform.problemdesc.value="";
}

function func_group_tp_categ2(displaytype)
{
	  document.getElementById("tp_problem_2").style.display = displaytype;
	  document.getElementById("problemdesc").style.display = displaytype;
	  func_group_submit(displaytype);
	  //reset form value
	  document.supportform.tp_problem_2.options[0].selected=true;
	  document.supportform.problemdesc.value="";
}

function func_group_tp_categ3(displaytype)
{
	  document.getElementById("tp_problem_3").style.display = displaytype;
	  document.getElementById("problemdesc").style.display = displaytype;
	  func_group_submit(displaytype);
	  //reset form value
	  document.supportform.tp_problem_3.options[0].selected=true;
	  document.supportform.problemdesc.value="";
}


function func_group_mailBouncing(displaytype)
{
	  document.getElementById("bounceMsgHeader").style.display = displaytype;
	  document.getElementById("bounceMsgBody").style.display = displaytype;
	  //reset form value
	  document.supportform.bounceMsgHeader.value="";
	  document.supportform.bounceMsgBody.value="";
	  document.supportform.problemdesc.value="";
}

function func_group_ealerts(displaytype)
{
	  document.getElementById("ealerts_problem_1").style.display = displaytype;
	  document.getElementById("problemdesc").style.display = displaytype;
	  func_group_submit(displaytype);
	  //reset form value
	  document.supportform.ealerts_problem_1.options[0].selected=true;
	  document.supportform.problemdesc.value="";
}

function func_group_directories(displaytype)
{
	  document.getElementById("directories_problem_1").style.display = displaytype;
	  document.getElementById("problemdesc").style.display = displaytype;
	  func_group_submit(displaytype);
	  //reset form value
	  document.supportform.directories_problem_1.options[0].selected=true;
	  document.supportform.problemdesc.value="";
}

function func_group_webmail(displaytype)
{
	  document.getElementById("webmail_problem_1").style.display = displaytype;
	  document.getElementById("problemdesc").style.display = displaytype;
	  func_group_submit(displaytype);
	  //reset form value
	  document.supportform.webmail_problem_1.options[0].selected=true;
	  document.supportform.problemdesc.value="";
}
function func_group_antispam(displaytype)
{
	  document.getElementById("antispam_problem_1").style.display = displaytype;
	  document.getElementById("problemdesc").style.display = displaytype;
	  func_group_submit(displaytype);
	  //reset form value
	  document.supportform.antispam_problem_1.options[0].selected=true;
	  document.supportform.problemdesc.value="";
}
function func_group_domain(displaytype)
{
	  document.getElementById("domain_problem_1").style.display = displaytype;
	  document.getElementById("problemdesc").style.display = displaytype;
	  func_group_submit(displaytype);
	  //reset form value
	  document.supportform.domain_problem_1.options[0].selected=true;
	  document.supportform.problemdesc.value="";
}
function func_group_concall(displaytype)
{
	  document.getElementById("concalltxt").style.display = displaytype;
	  document.getElementById("msgdots").style.display = displaytype;
	  document.getElementById("problemdesc").style.display = displaytype;
	  func_group_submit(displaytype);
	  //reset form value
	  document.supportform.problemdesc.value="";
}
function func_group_callcards(displaytype)
{
	  document.getElementById("callcards_problem_1").style.display = displaytype;
	  document.getElementById("callcardstxt").style.display = displaytype;
	  document.getElementById("msgdots").style.display = displaytype;
	  document.getElementById("problemdesc").style.display = displaytype;
	  func_group_submit(displaytype);
	  //reset form value
	  document.supportform.callcards_problem_1.options[0].selected=true;
	  document.supportform.problemdesc.value="";
}
function func_group_sms(displaytype)
{
	  document.getElementById("sms_problem_1").style.display = displaytype;
	  document.getElementById("problemdesc").style.display = displaytype;
	  func_group_submit(displaytype);
	  //reset form value
	  document.supportform.sms_problem_1.options[0].selected=true;
	  document.supportform.problemdesc.value="";
}
function func_group_sms_error(displaytype)
{
	  document.getElementById("whatbrowser").style.display = displaytype;
	  document.getElementById("errormsg").style.display = displaytype;
	  document.getElementById("problemdesc_txt").style.display = displaytype;
	  //reset form value
  	  document.supportform.whatbrowser.value="";
	  document.supportform.errormsg.value="";
	  document.supportform.problemdesc.value="";
}

<!-- Begin Email Checking routine
function emailCheck (emailStr) {

var checkTLD=1;

var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/;

var emailPat=/^(.+)@(.+)$/;

var validDname=/^(bigfoot.com|stones.com|bigfoot.de)$/;

var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";

var validChars="\[^\\s" + specialChars + "\]";

var quotedUser="(\"[^\"]*\")";

var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;

var atom=validChars + '+';

var word="(" + atom + "|" + quotedUser + ")";

var userPat=new RegExp("^" + word + "(\\." + word + ")*$");

var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");

var matchArray=emailStr.match(emailPat);

if (matchArray==null) {

alert("Bigfoot Email address seems incorrect (check @ and .'s)");
return false;

}
var user=matchArray[1];
var domain=matchArray[2];

var matchDom=domain.match(validDname);

for (i=0; i<user.length; i++) {
if (user.charCodeAt(i)>127) {
   alert("The Bigfoot Username/ID contains invalid characters.");
   return false;
   }
}

if (matchDom == null)  {
   alert("Please specify: bigfoot.com/stones.com/bigfoot.de as your domain name in your Bigfoot Username/ID");
   return false;
   }
for (i=0; i<domain.length; i++) {
if (domain.charCodeAt(i)>127) {
   alert("The Bigfoot domain name contains invalid characters.");
   return false;
   }
}

// See if "user" is valid

if (user.match(userPat)==null) {

// user is not valid

alert("The Bigfoot Username/ID doesn't seem to be valid.");
return false;
}

/* if the e-mail address is at an IP address (as opposed to a symbolic
host name) make sure the IP address is valid. */

var IPArray=domain.match(ipDomainPat);
if (IPArray!=null) {

// this is an IP address

for (var i=1;i<=4;i++) {
if (IPArray[i]>255) {
alert("Destination IP address is invalid!");
return false;
   }
}
return true;
}

// Domain is symbolic name.  Check if it's valid.

var atomPat=new RegExp("^" + atom + "$");
var domArr=domain.split(".");
var len=domArr.length;
for (i=0;i<len;i++) {
if (domArr[i].search(atomPat)==-1) {
alert("The Bigfoot domain (Bigfoot Email) name does not seem to be valid.");
return false;
   }
}

if (checkTLD && domArr[domArr.length-1].length!=2 &&
domArr[domArr.length-1].search(knownDomsPat)==-1) {
alert("The Bigfoot address must end with a valid domain (e.g. @bigfoot.com, @bigfoot.de or @stones.com " + "country.");
return false;
}

// Make sure there's a host name preceding the domain.

if (len<2) {
alert("This address is missing a Bigfoot hostname!");
return false;
}

// If we've gotten this far, everything's valid!
return true;
}
// End Email Checking -->

<!-- Begin Field checking routine
function checkFields() {
missinginfo = "";

if ((this.supportform.bigfoot_email.value == "") ||
   (this.supportform.bigfoot_email.value.indexOf('@') == -1) ||
   (this.supportform.bigfoot_email.value.indexOf('.') == -1)) {
   missinginfo += "\n     -  Bigfoot Username\ID";
   }
if ((this.supportform.alternate_email.value == "") ||
   (this.supportform.alternate_email.value.indexOf('@') == -1) ||
   (this.supportform.alternate_email.value.indexOf('.') == -1)) {
   missinginfo += "\n     -  Alternate Email address";
   }
if ((this.supportform.service.value.substring(0,this.supportform.service.value.indexOf(':'))) == "EMAIALER") {
   if (this.supportform.ealerts_problem_1.value == "") {
       missinginfo += "\n     -  Email Alerts problem option";
       }
}
if ((this.supportform.service.value.substring(0,this.supportform.service.value.indexOf(':'))) == "BIGFDIRE") {
   if (this.supportform.directories_problem_1.value == "") {
      missinginfo += "\n     -  Directories problem option";
      }
}
if ((this.supportform.service.value.substring(0,this.supportform.service.value.indexOf(':'))) == "WEB-MAIL") {
   if (this.supportform.webmail_problem_1.value == "") {
       missinginfo += "\n     -  WebMail problem option";
      }
}
if ((this.supportform.service.value.substring(0,this.supportform.service.value.indexOf(':'))) == "ANTISPAM") {
   if (this.supportform.antispam_problem_1.value == "") {
   missinginfo += "\n     -  Anti-Spam problem option";
   }
}
if ((this.supportform.service.value.substring(0,this.supportform.service.value.indexOf(':'))) == "DOMAIN01") {
   if (this.supportform.domain_problem_1.value == "") {
      missinginfo += "\n     -  Domain problem option";
      }
}
if (((this.supportform.service.value.substring(0,this.supportform.service.value.indexOf(':'))) == "WEBSMS01") ||
   ((this.supportform.service.value.substring(0,this.supportform.service.value.indexOf(':'))) == "SMSMGPRO") ||
   ((this.supportform.service.value.substring(0,this.supportform.service.value.indexOf(':'))) == "SMSMGBAS") ||
   ((this.supportform.service.value.substring(0,this.supportform.service.value.indexOf(':'))) == "SMSGATEW")) {
    if (this.supportform.sms_problem_1.value == "") {
       missinginfo += "\n     -  SMS problem option";
    }
}
if ((this.supportform.service.value.substring(0,this.supportform.service.value.indexOf(':'))) == "CALLCARD") {
   if (this.supportform.callcards_problem_1.value == "") {
      missinginfo += "\n     -  CallCards problem option";
   }
}
if ((this.supportform.category.value.substring(0,this.supportform.category.value.indexOf(':'))) == "ACCOCHAN") {
   if (this.supportform.ef_problem_1.value == "") {
      missinginfo += "\n     -  Account Change problem option";
      }
}
if ((this.supportform.category.value.substring(0,this.supportform.category.value.indexOf(':'))) == "FORWARDG") {
   if (this.supportform.ef_problem_2.value == "") {
      missinginfo += "\n     -  Forwarding problem option";
      }
}
if ((this.supportform.category.value.substring(0,this.supportform.category.value.indexOf(':'))) == "DISTRIBU") {
   if (this.supportform.ef_problem_3.value == "") {
      missinginfo += "\n     -  Distribution problem option";
      }
}
if ((this.supportform.category.value.substring(0,this.supportform.category.value.indexOf(':'))) == "CONSOLID") {
   if (this.supportform.ef_problem_4.value == "") {
      missinginfo += "\n     -  Consolidation problem option";
      }
}
if ((this.supportform.category.value.substring(0,this.supportform.category.value.indexOf(':'))) == "AUTOREMI") {
   if (this.supportform.ef_problem_5.value == "") {
      missinginfo += "\n     -  Auto-Reminder problem option";
      }
}
if ((this.supportform.category.value.substring(0,this.supportform.category.value.indexOf(':'))) == "AUTORESP") {
   if (this.supportform.ef_problem_6.value == "") {
      missinginfo += "\n     -  Auto-Responder problem option";
      }
}
if ((this.supportform.category.value.substring(0,this.supportform.category.value.indexOf(':'))) == "FILTERIN") {
   if (this.supportform.ef_problem_7.value == "") {
      missinginfo += "\n     -  Filtering problem option";
      }
}
if ((this.supportform.category.value.substring(0,this.supportform.category.value.indexOf(':'))) == "PERMAWEB") {
   if (this.supportform.ef_problem_8.value == "") {
      missinginfo += "\n     -  Permaweb problem option";
      }
}
if ((this.supportform.category_2.value.substring(0,this.supportform.category_2.value.indexOf(':'))) == "NEWACCNT") {
   if (this.supportform.tp_problem_1.value == "") {
      missinginfo += "\n     -  New Account problem option";
      }
}
if ((this.supportform.category_2.value.substring(0,this.supportform.category_2.value.indexOf(':'))) == "ACCOCHAN") {
   if (this.supportform.tp_problem_2.value == "") {
      missinginfo += "\n     -  Account Change problem option";
      }
}
if ((this.supportform.category_2.value.substring(0,this.supportform.category_2.value.indexOf(':'))) == "MANAACCT") {
   if (this.supportform.tp_problem_3.value == "") {
      missinginfo += "\n     -  Manage Account problem option";
      }
}
if ((this.supportform.problemdesc.value == "")||
   (this.supportform.problemdesc.value == null)) {
   missinginfo += "\n     -  Problem description";
   }
if (missinginfo != "") {
   missinginfo = "You failed to correctly fill in your:\n" +
   missinginfo + "\n\nPlease re-enter and submit again!";
   alert(missinginfo);
   return false;
}
else return true;
}
//  End Field checking-->

