u = window.location;
m = "I thought this might interest you...";
function mailThisUrl(){
  var e_add= prompt('Enter recipient\'s email address:','');
  if ((e_add=="") || (e_add==" ") || (e_add==null)) {
  e_add="enter-email-address";
  }
  window.location = "mailto:"+e_add+"?subject="+m+"&body="+document.title+" | "+u;
}
function addToFavorites()
 {
  if (window.external)
  {
   window.external.AddFavorite(window.document.location,window.document.title)
  }
  else
  { 
   alert("Sorry! Your browser doesn't support this function.");
  }
 }

var theSets = new Array();
theSets[0] = 'g_01';
theSets[1] = 'g_02';
theSets[2] = 'g_03';
theSets[3] = 'g_04';
theSets[4] = 'g_05';
theSets[5] = 'g_06';
theSets[6] = 'g_07';
theSets[7] = 'g_08';
theSets[8] = 'g_09';
theSets[9] = 'g_10';

var s = theSets.length;
var whichNum = Math.round(Math.random()*(s-1));
var whichSet = theSets[whichNum];

var theImage = whichSet+'.jpg';
var preBuffer = new Array();
   preBuffer[0] = new Image();
   preBuffer[0].src = '../assets/images/rotate/'+theImage;
function showImage(w,h){
   document.write('<img src="../assets/images/rotate/'+theImage+'" border="0" width="'+w+'"'+' height="'+h+'">');
}
function clickclear(thisfield, defaulttext) {
   if (thisfield.value == defaulttext) {
      thisfield.value = "";
   }
}
function CheckVals() {		
	var strVal
	var reLetter = /^[a-zA-Z]$/
	
	strVal = document.frmTrackShip.voucher_num.value.toString()
	
	for (var i = 0; i < strVal.length; i++){
		var oneChar = strVal.charAt(i)
		if (reLetter.test(oneChar) == true){
			alert("The tracking number should contain only whole numbers. Note: Do NOT include the 3 character prefix (I.E. LAX1234567).")
			return false
		}
	}
	
	if (strVal == ""){
		alert("You must enter a valid tracking number.");
		return false;
	}else if ((strVal.length < 7) || (strVal.length > 9)){
		alert("A tracking number is between 7 and 9 digits.");
		return false;
	}else{
		document.frmTrackShip.submit()
	}
}