<!-- Begin

	var sPath = location.pathname.toLowerCase();
	var sPathParts = sPath.split("/");
	var sPageName = sPathParts[sPathParts.length - 1];

	var jsDayOfWeek = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
	var jsMonth = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");

function GetWeekday() {
	var jsToday = new Date();
	var jsDate = jsDayOfWeek[jsToday.getDay()] 
	return jsDate;
}

function GetMonthDay() {
	var jsDate;
	var jsToday = new Date();
	var jsDay = jsToday.getDate();
	var jsDateSuffix = "th";
	if (jsDay==1 || jsDay==21 || jsDay==31) jsDateSuffix = "st";
	if (jsDay==2 || jsDay==22) jsDateSuffix = "nd";
	if (jsDay==3 || jsDay==23) jsDateSuffix = "rd";
	jsDay+=jsDateSuffix;
	jsDate = jsMonth[jsToday.getMonth()] + " " + jsDay;
	return jsDate;
}

function OpenWindow(sURL, sWindowName, iWidth, iHeight) {
	var iWindowWidth = iWidth;
	var iWindowHeight = iHeight;
	if (isNaN(iWindowWidth) == true || iWindowWidth == 0) iWindowWidth = 600;
	iWindowWidth = iWindowWidth + 50
	if (isNaN(iWindowHeight) == true || iWindowHeight == 0) iWindowHeight = Math.round(iWindowWidth * .8);
	var oNewWindow = window.open(sURL, sWindowName, "width=" + iWindowWidth + ", height=" + iWindowHeight + ", resizable=1, scrollbars=1");
	if (oNewWindow != null) oNewWindow.focus();
	return;
}

function OpenAppWindow(sURL, sWindowName, iWidth, iHeight) {
	var iWindowWidth = iWidth;
	var iWindowHeight = iHeight;
	if (isNaN(iWindowWidth) == true || iWindowWidth == 0) iWindowWidth = 600;
	iWindowWidth = iWindowWidth + 50
	if (isNaN(iWindowHeight) == true || iWindowHeight == 0) iWindowHeight = Math.round(iWindowWidth * .8);
	var oNewWindow = window.open(sURL, sWindowName, "width=" + iWindowWidth + ", height=" + iWindowHeight + ", menubar=1, resizable=1, scrollbars=1");
	if (oNewWindow != null) oNewWindow.focus();
	return;
}

function ShowParentWindow(sURL) {
	window.opener.location = sURL;
	window.opener.focus();
	return;
}

function Undefined(Value) {
	var Undef;
	return (Value == Undef);
}

function NoAction() {
	return;
}

function RollOver(imgName, imgFile) {
	document[imgName].src = "images/" + imgFile;
	return;
}						

function UniqueURL() {
	var dtNow = new Date();
	var sUURL = "&UURL=" + dtNow.getHours() + "." + dtNow.getMinutes() + "." + dtNow.getSeconds() + "." + Math.round(Math.random() * 1000);
	return sUURL;
}

function GetQueryString() {
	var args = new Object();
	var query = location.search.substring(1);
	var pairs = query.split("&");
	for(var i = 0; i < pairs.length; i++) {
		var pos = pairs[i].indexOf('=');
		if (pos == -1) continue;
		var argname = pairs[i].substring(0, pos);
		var value = pairs[i].substring(pos + 1);
		args[argname] = unescape(value);
	}
	return args;
}

function PreloadImages(imgarray) {
	if (Undefined(imgarray) == false) {
		for (var iX = 0; iX < imgarray.length; iX++) {
			var imgcache = new Image;
			imgcache.src = imgarray[iX];
		}
	}
}

function MM_swapImgRestore() {
  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 MM_preloadImages() {
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) {
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() {
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function Alert4PaySite(sProduct, sSitename) {
	var sMsg = sSitename + " is under contract with us to process online orders and collect payments. If you have any content-related or technical questions about " + sProduct + ", please contact us directly at: Support@FileAmigo.com. \n\n Click OK to be transferred to " + sSitename + " (which will take a moment)."
	if (confirm(sMsg)) return true;
	else return false;
}

//  End -->


