
function loginError()
{
	var errorcheck=0;
	var itemname='username';
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(itemname).style.background = '#FFEAEA';
		document.getElementById(itemname).style.border = '1px solid #FF9F9F';
		errorcheck=1;
	}
	else {
		if (document.layers) { // Netscape 4
			document.itemname.background = '#FFEAEA';
			document.itemname.border = '1px solid #FF9F9F';
		}
		else { // IE 4
			document.all.itemname.style.background = '#FFEAEA';
			document.itemname.border = '1px solid #FF9F9F';
		}
	}	
	itemname='password';
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(itemname).style.background = '#FFEAEA';
		document.getElementById(itemname).style.border = '1px solid #FF9F9F';
	}
	else {
		if (document.layers) { // Netscape 4
			document.itemname.background = '#FFEAEA';
			document.itemname.border = '1px solid #FF9F9F';
		}
		else { // IE 4
			document.all.itemname.style.background = '#FFEAEA';
			document.itemname.border = '1px solid #FF9F9F';
		}
	}
	itemname='errordiv';
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(itemname).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.itemname.display = 'block';
		}
		else { // IE 4
			document.all.itemname.style.display = 'block';
		}
	}
}

		
function switch_product_nav(divName, totalSubs, totalsubnav) {
	for (var i=1; i<=totalSubs; i++) {
		var showDivName = 'subj' + i;
		var showDivLink = 'link' + i;
		var showObj = null;
		var showObjLink = null;
		var j=1;
		if( document.getElementById ) {
    			showObj = document.getElementById(showDivName);
			showObjLink = document.getElementById(showDivLink);
			if (showDivName == divName){
				//howObj.style.background = '#00A3FF';
				showObjLink.style.background = '#00A3FF';
				showObj.style.color = '#FFFFFF';
				showObjLink.style.color = '#FFFFFF';
				if (totalsubnav>0){
					for (j=1; j<=totalsubnav; j++)
					{
						var showSubName = 'subj' + i + 'sub' + j;	
						var showSub = null;
						showSub = document.getElementById(showSubName);
						if (showSub !== null){
						showSub.style.display= 'block';}
					}
				}
			}
			else {
				showObj.style.background = '#EEEEEE';
				showObjLink.style.background = '#EEEEEE';
				showObj.style.color = '#666666';
				showObjLink.style.color = '#666666';
				if (totalsubnav>0){
					for (j=1; j<=totalsubnav; j++)
					{
						var showSubName = 'subj' + i + 'sub' + j;	
						var showSub = null;
						showSub = document.getElementById(showSubName);
						if (showSub !== null){
						showSub.style.display= 'none';}
					}
				}
			}
   		}
		else {
   			if( document.layers ) {   
    				showObj = document.showDivName;
				showObjLink = document.showDivLink;
				if (showDivName == divName){
					//showObj.background = '#00A3FF';
					showObjLink.background = '#00A3FF';
					showObj.color = '#FFFFFF';
					showObjLink.color = '#FFFFFF';
					if (totalsubnav>0){
						for (j=1; j<=totalsubnav; j++)
						{
							var showSubName = 'subj' + i + 'sub' + j;	
							var showSub = null;
							showSub = document.showSubName;
							if (showSub !== null){
							showSub.display= 'block';}
						}
					}
				}
				else {
					showObj.background = '#EEEEEE';
					showObjLink.background = '#EEEEEE';
					showObj.color = '#666666';
					showObjLink.color = '#666666';
					if (totalsubnav>0){
						for (j=1; j<=totalsubnav; j++)
						{
							var showSubName = 'subj' + i + 'sub' + j;	
							var showSub = null;
							showSub = document.showSubName;
							if (showSub !== null){
							showSub.display= 'none';}
						}
					}
				}
   			}
			else {

				if( document.all ) {
    					showObj = document.all.showDivName;
					showObjLink = document.all.showDivLink;
					if (showDivName == divName){
						//showObj.style.background = '#00A3FF';
						showObjLink.style.background = '#00A3FF';
						showObj.style.color = '#FFFFFF';
						showObjLink.style.color = '#FFFFFF';
						if (totalsubnav>0){
							for (j=1; j<=totalsubnav; j++)
							{
								var showSubName = 'subj' + i + 'sub' + j;	
								var showSub = null;
								showSub = document.all.showSubName;
								if (showSub !== null){
								showSub.style.display= 'block';}
							}
						}
					}
					else {
						showObj.style.background = '#EEEEEE';
						showObjLink.style.background = '#EEEEEE';
						showObj.style.color = '#666666';
						showObjLink.style.color = '#666666';
						if (totalsubnav>0){
							for (j=1; j<=totalsubnav; j++)
							{
								var showSubName = 'subj' + i + 'sub' + j;	
								var showSub = null;
								showSub = document.all.showSubName;
								if (showSub !== null){
								showSub.style.display= 'none';}
							}
						}
					}
   				} 
			} 
		}
	}
}

function show_default_nav(itemname,itemlink) {
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(itemname).style.background = '#00A3FF';
		document.getElementById(itemlink).style.background = '#00A3FF';
		document.getElementById(itemlink).style.color = '#FFFFFF';
	}
	else {
		if (document.layers) { // Netscape 4
			document.itemname.background = '#00A3FF';
			document.itemlink.background = '#00A3FF';
			document.itemlink.color = '#FFFFFF';
		}
		else { // IE 4
			document.all.itemname.style.background = '#00A3FF';
			document.all.itemlink.style.background = '#00A3FF';
			document.itemlink.style.color = '#FFFFFF';
		}
	}
}

function hide_default_subnav(totalsubnav,totalsub) {
	for (var i=1; i<=totalsub; i++){
		if( document.getElementById ){
			for (var j=1; j<=totalsubnav; j++)
			{
						var showSubName = 'subj' + i + 'sub' + j;	
						var showSub = null;
						showSub = document.getElementById(showSubName);
						if (showSub !== null){
						showSub.style.display= 'none';}
			}
		}
		else
		{
			if (document.layers) {
				for (var j=1; j<=totalsubnav; j++)
				{
						var showSubName = 'subj' + i + 'sub' + j;	
						var showSub = null;
						showSub = document.showSubName;
						if (showSub !== null){
						showSub.display= 'none';}
				}
			}
			else {
				for (var j=1; j<=totalsubnav; j++)
				{
						var showSubName = 'subj' + i + 'sub' + j;	
						var showSub = null;
						showSub = document.all.showSubName;
						if (showSub !== null){
						showSub.style.display= 'none';}
				}
			}
		}	
	}
}

function contactError()
{
	var errorcheck=0;
	var itemname='custname';
	if (document.getElementById) { // DOM3 = IE5, NS6
		if (document.getElementById(itemname).value==''){
			document.getElementById(itemname).style.background = '#FFEAEA';
			document.getElementById(itemname).style.border = '1px solid #FF9F9F';
			errorcheck=1;
		}
	}
	else {
		if (document.layers) { // Netscape 4
			if (document.itemname.value==''){
				document.itemname.background = '#FFEAEA';
				document.itemname.border = '1px solid #FF9F9F';
				errorcheck=1;		
			}
		}
		else { // IE 4
			if (document.all.itemname.value==''){
				document.all.itemname.style.background = '#FFEAEA';
				document.itemname.border = '1px solid #FF9F9F';
				errorcheck=1;
			}
		}
	}
	itemname='company';
	if (document.getElementById) { // DOM3 = IE5, NS6
		if (document.getElementById(itemname).value==''){
			document.getElementById(itemname).style.background = '#FFEAEA';
			document.getElementById(itemname).style.border = '1px solid #FF9F9F';
			errorcheck=1;
		}
	}
	else {
		if (document.layers) { // Netscape 4
			if (document.itemname.value==''){
				document.itemname.background = '#FFEAEA';
				document.itemname.border = '1px solid #FF9F9F';
				errorcheck=1;
			}
		}
		else { // IE 4
			if (document.all.itemname.value==''){
				document.all.itemname.style.background = '#FFEAEA';
				document.itemname.border = '1px solid #FF9F9F';
				errorcheck=1;
			}
		}
	}
	itemname='emailadd';
	if (document.getElementById) { // DOM3 = IE5, NS6
		if (document.getElementById(itemname).value==''){
			document.getElementById(itemname).style.background = '#FFEAEA';
			document.getElementById(itemname).style.border = '1px solid #FF9F9F';
			errorcheck=1;
		}
	}
	else {
		if (document.layers) { // Netscape 4
			if (document.itemname.value==''){
				document.itemname.background = '#FFEAEA';
				document.itemname.border = '1px solid #FF9F9F';
				errorcheck=1;
			}
		}
		else { // IE 4
			if (document.all.itemname.value==''){
				document.all.itemname.style.background = '#FFEAEA';
				document.itemname.border = '1px solid #FF9F9F';
				errorcheck=1;
			}
		}
	}
	itemname='tel';
	if (document.getElementById) { // DOM3 = IE5, NS6
		if (document.getElementById(itemname).value==''){
			document.getElementById(itemname).style.background = '#FFEAEA';
			document.getElementById(itemname).style.border = '1px solid #FF9F9F';
			errorcheck=1;
		}
	}
	else {
		if (document.layers) { // Netscape 4
			if (document.itemname.value==''){
				document.itemname.background = '#FFEAEA';
				document.itemname.border = '1px solid #FF9F9F';
				errorcheck=1;
			}
		}
		else { // IE 4
			if (document.all.itemname.value==''){
				document.all.itemname.style.background = '#FFEAEA';
				document.itemname.border = '1px solid #FF9F9F';
				errorcheck=1;
			}
		}
	}
	itemname='subj';
	if (document.getElementById) { // DOM3 = IE5, NS6
		if (document.getElementById(itemname).value==''){
			document.getElementById(itemname).style.background = '#FFEAEA';
			document.getElementById(itemname).style.border = '1px solid #FF9F9F';
			errorcheck=1;
		}
	}
	else {
		if (document.layers) { // Netscape 4
			if (document.itemname.value==''){
				document.itemname.background = '#FFEAEA';
				document.itemname.border = '1px solid #FF9F9F';
				errorcheck=1;
			}
		}
		else { // IE 4
			if (document.all.itemname.value==''){
				document.all.itemname.style.background = '#FFEAEA';
				document.itemname.border = '1px solid #FF9F9F';
				errorcheck=1;
			}
		}
	}
	itemname='msg';
	if (document.getElementById) { // DOM3 = IE5, NS6
		if (document.getElementById(itemname).value==''){
			document.getElementById(itemname).style.background = '#FFEAEA';
			document.getElementById(itemname).style.border = '1px solid #FF9F9F';
			errorcheck=1;
		}
	}
	else {
		if (document.layers) { // Netscape 4
			if (document.itemname.value==''){
				document.itemname.background = '#FFEAEA';
				document.itemname.border = '1px solid #FF9F9F';
				errorcheck=1;
			}
		}
		else { // IE 4
			if (document.all.itemname.value==''){
				document.all.itemname.style.background = '#FFEAEA';
				document.itemname.border = '1px solid #FF9F9F';
				errorcheck=1;
			}
		}
	}
	if (errorcheck==1){
		itemname='errordiv';
		if (document.getElementById) { // DOM3 = IE5, NS6
			document.getElementById(itemname).style.display = 'block';
		}
		else {
		if (document.layers) { // Netscape 4
			document.itemname.display = 'block';
			}
			else { // IE 4
				document.all.itemname.style.display = 'block';
			}
		}
	}
}
