/* define variables for "if n4 (Netscape 4), if IE (IE 4.x),
and if n6 (if Netscape 6/W3C-DOM compliant)" */

var n4, ie, n6;

/* detecting browser support for certain key objects/methods and
assembling a custom document object */


var doc,doc2,doc3,sty;
// the variables for the window dimensions
var win_width,win_height;
var centerhor, centerver;

function getBrowser() {
if (document.layers) {
  doc = "document.";
  doc2 = ".document.";
  doc3 = "";
  sty = "";
  n4 = true;
  }
else if (document.all) {
  doc = "document.all.";
  doc2 = "";
  doc3 = "";
  sty = ".style";
  ie = true;
}

else if (document.getElementById) {
  doc = "document.getElementById('";
  doc2 ="')";
  doc3 ="')";
  sty = "').style";
  n6 = "true";
 }
}





//Get dimensions of the window
function dimensions() {
getBrowser();
win_width=document.body.clientWidth;
win_height=document.body.clientHeight;
if(n4 || n6){
 win_width=window.innerWidth;
 win_height=window.innerHeight;
}

else if(ie) {
  win_width=document.body.clientWidth;
  win_height=document.body.clientHeight;
     }

centerhor = win_width/2;
centerver = win_height/2;
}
function focusFirstField() {
	// document.DataForm.company.focus();
}
function doIt(){
	var wInformation = "Checkbox Requests = \r\n";
	// if ( document.DataForm.ebusiness.checked )
	if ( document.DataForm.elements['ebusiness'].checked )
		{
			wInformation = wInformation + " eBusiness requested,   ";
		}
	if ( document.DataForm.elements['eintelliprise'].checked )
			{
				wInformation = wInformation + " eIntelliprise requested,   ";
			}
	if ( document.DataForm.elements['flow'].checked )
				{
					wInformation = wInformation + " Flow requested,   ";
				}
	if ( document.DataForm.elements['system390'].checked )
				{
						wInformation = wInformation + " System390 requested,   ";
				}
	if ( document.DataForm.elements['services'].checked )
					{
							wInformation = wInformation + " Services requested,   ";
				}
	if ( document.DataForm.elements['logility'].checked )
						{
								wInformation = wInformation + " Logilityrequested,   ";
				}
	if ( document.DataForm.elements['ngc'].checked )
						{
								wInformation = wInformation + " ngc requested,   ";
				}


	document.DataForm.MessageText.value = "Ask for more Information from www.amsoftware.com"
	+ "\r\n" + "Name= " +
	  document.DataForm.name.value + "\r\n" + "Company= " +
	 document.DataForm.company.value + "\r\n" + "Title= " +
	 document.DataForm.title.value + "\r\n" + "Address= " +
	 document.DataForm.address.value + "\r\n" + " CITY/State/zip " +
	 document.DataForm.city.value + "  " +
										  document.DataForm.province.value + "  " +
										document.DataForm.state.value + "  " +
										  document.DataForm.zip.value + " Country= " +
										  document.DataForm.country.value + "  " +
										  "\r\n" + "Phone= " +
	 document.DataForm.phone.value + " Fax= " +
										  document.DataForm.fax.value + " email= " +
										  document.DataForm.email.value +
											"\r\n" +
	 					"Comments= " + document.DataForm.comments.value + "\r\n"
	 					+ wInformation;

	document.DataForm.submit();
}

function doSideBar() {
	obj=document.getElementById("Side1");
  //  window.status = 'top = ' + obj.style.pixelTop

}

function doBrickHead() {
	obj=document.getElementById("Brickhead");
   // window.status = 'top = ' + obj.style.pixelTop
}
function doTopLogo() {
	//obj=document.getElementById("ASIlogo");
   // window.status = 'top = ' + obj.style.pixelTop
}
function doBrickPad() {
	// obj=document.getElementById("brickpad");
   // window.status = 'top = ' + obj.style.pixelTop

}
function doBrochure() {
	obj=document.getElementById("brochure");
    window.status = 'top = ' + obj.style.pixelTop
}

function startPage() {
	dimensions()
	focusFirstField();
}