
var NeedHelp = null;
function PopUpHelp() 
{ 
	if (NeedHelp != null && !NeedHelp.closed) NeedHelp.close(); 
	
	// alert(location.href);
	var myLocation = location.href;
	var _index1 = myLocation.lastIndexOf("/");
	if (_index1 == -1) _index1 = 0;
	var _index2 = myLocation.lastIndexOf("?");
	if (_index2 == -1) _index2 = myLocation.length;
	var pageName = myLocation.substring(_index1 + 1, _index2);
	// alert("page=" + pageName);
	strURL = "siteRefer=DeliveryMaps.com&pageRefer=" + pageName;
	// alert(strURL);

	if (location.href.indexOf('default.aspx') != -1 || location.href.indexOf('Default.aspx') != -1)
		strURL = "Information/pophelp.aspx?" + strURL;
	else if (location.href.indexOf('secure') != -1 || location.href.indexOf('Secure') != -1)		
		strURL = "http://www.deliverymaps.com/Information/pophelp.aspx?" + strURL;
	else
		strURL = "../Information/pophelp.aspx?" + strURL;

	var strOptions="left=250,top=30,screenX=250,screenY=30";
 	strOptions += "toolbar=0,location=0,menubar=0,scrollbars=1,resizable=1,height=810,width=720"; 
 	NeedHelp = window.open(strURL, 'NeedHelp', strOptions); 
 	NeedHelp.focus();
// window.open('" + aUrl + "','NeedHelp','left=252,top=170,screenX=252,screenY=170,toolbar=0,location=0,menubar=0,scrollbars=1,resizable=1,width=770,height=770'); 
} // PopUpHelp

var MapInfo = null;
function InfoPopUp(strURL) 
{ 
	if (MapInfo != null && !MapInfo.closed) MapInfo.close(); 
	var strOptions = "";
	// alert(document.location.href);
	// var strOptions="left=252,top=25,screenX=252,screenY=25"; 
 	// strOptions += "toolbar=1,location=1,status=1, menubar=1,scrollbars=1,resizable=1,height=700,width=770"; 
 	MapInfo = window.open(strURL, 'MapInfo', strOptions); 
 	MapInfo.focus();
}

function IsIE()
{
	// current version only works on IE
	if (navigator.appName.indexOf("Microsoft Internet Explorer") == -1)
	{
		var msg = "The Custom Map application is currently compatible with IE browser only.\n";
		msg += "Please contact a representative at 1-877-447-MAPS to order.";
		alert(msg);
		return false;
	}
	else return true;
} // IsIE

// to disable the return key on multiple browsers
function CheckKeyPress(e) {
	var keyPress = document.all? window.event.keyCode:e.which;
	if (keyPress == 13) {
			// the focus has to be called before the click for Netscape browser
			// document.getElementById('Continue').focus();
			// document.getElementById('Continue').click();
	}
	return keyPress != 13;
}

var _myLocation = document.location.href;

function GoHome()
{
	if (_myLocation.indexOf('secure') != -1 || _myLocation.indexOf('Secure') != -1)
		document.location.href = "http://www.deliverymaps.com/default.aspx";
	else if (_myLocation.indexOf("default") == -1 && _myLocation.indexOf("Default") == -1)
		document.location.href = "../default.aspx";
	else 
		document.location.href = "default.aspx";
}

var FreeShipDetail = null;

function OpenFreeShipDetail()
{
	if (FreeShipDetail != null && !FreeShipDetail.closed) FreeShipDetail.close(); 

	if (_myLocation.indexOf('default.aspx') != -1 || _myLocation.indexOf('Default.aspx') != -1)
		strURL = "Information/freeship-detail.htm";
	else if (_myLocation.indexOf('secure') != -1 || _myLocation.indexOf('Secure') != -1)		
		strURL = "http://www.deliverymaps.com/Information/freeship-detail.htm";
	else
		strURL = "../Information/freeship-detail.htm";

	var strOptions="left=250,top=100,screenX=250,screenY=100";
 	strOptions += "toolbar=0,location=0,menubar=0,scrollbars=1,resizable=1,height=350,width=400"; 
 	FreeShipDetail = window.open(strURL, 'FreeShipDetail', strOptions); 
 	FreeShipDetail.focus();
} var win = null; function NewWindow(mypage, myname, w, h, scroll, pos) { if (pos == "random") { LeftPosition = (screen.width) ? Math.floor(Math.random() * (screen.width - w)) : 100; TopPosition = (screen.height) ? Math.floor(Math.random() * ((screen.height - h) - 75)) : 100; } if (pos == "center") { LeftPosition = (screen.width) ? (screen.width - w) / 2 : 100; TopPosition = (screen.height) ? (screen.height - h) / 2 : 100; } else if ((pos != "center" && pos != "random") || pos == null) { LeftPosition = 0; TopPosition = 20 } settings = 'width=' + w + ',height=' + h + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=' + scroll + ',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no'; win = window.open(mypage, myname, settings); } function showCarto(id, name, zoom) { var cartoviewer = ''; cartoviewer = window.open('http://209.196.49.230/cartoviewer.asp?path=' + id + '&title=' + name + '&zoom=' + zoom, "cartoview", "width=600,height=660,toolbar=0,menubar=0,location=0,scrollbars=0,resizable=0"); if (window.focus) { cartoviewer.focus(); } }

try {
    $(function() {

            $('a.styleadvisorlink').click(function() {
                window.open(this.href, "StyleAdvisor", "left=0,top=0,screenX=250,screenY=30,toolbar=1,location=1,menubar=1,scrollbars=1,resizable=1,width=" + screen.availwidth + ",height=" + screen.availheight + "\"");
                return false;
            });
    });
} catch (e) { }
