
function createWindow(target,width,height) {
  targetName = target;
  targetName = target.substring(0, target.lastIndexOf('.'));
  if (target.indexOf('/') != -1) { targetName = targetName.substring(targetName.lastIndexOf('/')+1, length.targetName); }
//  params = "toolbar=no,width=" + width + ",height=" + height + ",directories=no,location=no,status=no,scrollbars=no,resizable=yes,menubar=no";
//  alert("x" + targetName + "x");

  window.open(target, targetName, "toolbar=no,width=" + width + ",height=" + height + ",directories=no,location=no,status=no,scrollbars=no,resizable=yes,menubar=no");
}


browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
if (browserName == "Netscape" && browserVer >= 3) version = "n3";
else version = "n2";
if (version == "n2" && browserName == "Microsoft Internet Explorer" && browserVer >= 4) version = "n3";
if (version == "n3") {
	blogon = new Image(140, 20);
	blogon.src = "images/blog_on.gif";

	blogoff = new Image(140, 20);
	blogoff.src = "images/blog_off.gif";
}

function img_act(imgName) {
  if (version == "n3") {
	imgOn = eval(imgName + "on.src");
	document[imgName].src = imgOn;
  }
}

function img_inact(imgName) {
  if (version == "n3") {
	imgOff = eval(imgName + "off.src");
	document[imgName].src = imgOff;
  }
}


function getCookie(cookieHeader) {
  var search = cookieHeader + "=", cookieString = "";
  if (document.cookie.length > 0) {
	findNameIndex = document.cookie.indexOf(search);
	if (findNameIndex != -1) {
		findNameIndex += search.length;
		endIndex = document.cookie.indexOf(";", findNameIndex);
		if (endIndex == -1) endIndex = document.cookie.length;
		cookieString = document.cookie.substring(findNameIndex, endIndex);
	}
  }
  return (cookieString);
}


function check_email() {
  var valid = 1;

  if (document.form1.email.value.indexOf("@") == -1) {
	valid = 0; mes = ' All e-mail addresses must contain a "@"!';
  }
  if (document.form1.email.value.indexOf(" ") != -1) {
	valid = 0; mes = " E-mail addresses cannot contain spaces!";
  }
  if (document.form1.email.value.length <= 6) {
	valid = 0; mes = " This is too short to be a valid e-mail address!";
  }
  if (document.form1.email.value.indexOf("@.") != -1 || document.form1.email.value.indexOf (".@") != -1) {
	valid = 0; mes = ' Dot punctuation cannot be adjacent to the "@"!';
  }

  if (valid == 0 && document.form1.email.value.length > 0) {
	alert('"'+ document.form1.email.value + '"' + " is not a valid e-mail address." + "\n" + mes + "\n" + " Please try again.");
	document.form1.email.value = "";
	document.form1.email.focus();
  }
}

function check_phone() {
  if (document.form1.Phone.value.length < 10 && document.form1.Phone.value.length > 0) {
	alert(" Please don't forget to enter your phone number area code.");
	newValue =  "(area code) " + document.form1.Phone.value;
	document.form1.Phone.value = newValue;
	document.form1.Phone.focus();
  }
}

function message(txt) { window.status = txt; }
function remove_message() { window.status = ""; }
