//validateBrowser();

if (document.images) {
  bulleton = new Image();
  arrowon = new Image();
  
		bulletoff = new Image();
		
  bulleton.src = "images/bullet.gif";
  arrowon.src = "images/arrow2.gif";
  
		bulletoff.src = "images/bullet2.gif";
}
function changeImages() {
  if (document.images) {
    for (var i=0; i<changeImages.arguments.length; i+=2) {
      document[changeImages.arguments[i]].src = eval(changeImages.arguments[i+1] + ".src");
    }
  }
}

function validateContactForm(form) {
if (form.eml.value == "") { alert('Please enter your valid email address'); return(false);}
if (form.msg.value == "") { alert('Please provide a message to send.'); return(false); }
if (form.msg.value.length > 2000) { alert('Please limit your message to 2000 characters.'); return (false); }
return(true);
}

function validateContactForm2(form) {
if (form.from.value == "") { alert('Please enter your valid email address'); return(false);}
if (form.msg.value == "") { alert('Please provide a message to send.'); return(false); }
if (form.msg.value.length > 2000) { alert('Please limit your message to 2000 characters.'); return (false); }
return(true);
}

function validateBrowser() {
	strVers=navigator.appVersion
	strName=navigator.appName
	strPlat=navigator.platform
	intIndex1=strVers.indexOf("MSIE");
	intIndex1=intIndex1+5
	intIndex2=strVers.lastIndexOf(";");
	intVer=strVers.substring(intIndex1, intIndex2)
	intVer=parseInt(intVer)
	if (strName=="Microsoft Internet Explorer" && strPlat=="Win32" && intVer>="5") {
		
	}
	else {
	document.location.href = "x.asp?xres=7";
	}
}

function ConfirmDelete(arg) {
	if (confirm("This action cannot be undone.  Are you sure you want to delete this ?") == true) {
		location.href = arg;
		}
		}
function openWin(URL) {
window.open(URL,'_blank','width=640,height=420,toolbar=no,location=no,status=no,menubar=yes,scrollbars=yes,resizable=yes');
}


function DelDocument(DocumentID)
	{
	if (confirm("Delete this document and all sub-level documents ?") == true) 
		{
		window.navigate("Default.asp?action=del&DocumentID="+DocumentID);
		}
	}
	function DelSubDocument(DocumentID)
	{
	if (confirm("Delete this sub-level document and all further sub documents ?") == true) 
		{
		window.navigate("SubDefault.asp?action=del&DocumentID="+DocumentID);
		}
	}
	function DelSubLevelDocument(DocumentID)
	{
	if (confirm("Delete this sub-level document ?") == true) 
		{
		window.navigate("SubDefaultLevel.asp?action=del&DocumentID="+DocumentID);
		}
	}
function makeMonthArray() {

        this.length=12;
        this[1] = "Jan.", this[2] = "Feb."; this[3] = "March";
        this[4] = "April", this[5] = "May"; this[6] = "June";
        this[7] = "July", this[8] = "Aug."; this[9] = "Sept.";
        this[10] = "Oct.", this[11] = "Nov."; this[12] = "Dec.";
        return(this);

}

function makeDayArray() {

        this.length=7;
        this[1] = "Sunday", this[2] = "Monday"; this[3] = "Tuesday";
        this[4] = "Wednesday", this[5] = "Thursday"; this[6] = "Friday";
        this[7] = "Saturday";
        return(this);

}

function writeDate() {

        attdate = new Date();
        monthName = new makeMonthArray();
        dayName = new makeDayArray();
        day = attdate.getDay() + 1;
        date = attdate.getDate();
        month = attdate.getMonth() + 1;
        year = attdate.getYear();
        if (90 <= year && year < 2000) {
                year = 1900 + year;
        }
        dateStr  = dayName[day];
        dateStr += ", ";
        dateStr += monthName[month];
        dateStr += " ";
        dateStr += date;
        dateStr += ", ";
        dateStr += year;

        document.write(dateStr);

}

function saveIt(url,ttl) {
window.location.href = "bookmark.asp?url=" + url + "&title=" + ttl; 
}
function removeIt(url,ttl) {
window.location.href = "bookmarkun.asp?url=" + url + "&title=" + ttl; 
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function DisplayContent(URL){
if (navigator.appName == "Microsoft Internet Explorer") {
document.write('<IFRAME src="'+ URL + '" width=800 height=800></IFRAME>');
}
else{
openWin(URL);
}
}

function sendEmail(title,eml) {
document.location.href = "Sendmail.asp?title=" + title + "&eml=" + eml;
}