var sDocumentLocation;
var sDocumentLocation_Split;
var sDocumentLocation_RemoveQuery;


sDocumentLocation = document.location.href;
sDocumentLocation_Split = sDocumentLocation.split('/');
sDocumentLocation_RemoveQuery = sDocumentLocation_Split[sDocumentLocation_Split.length-1].split('?');

function parseQuery(iPair) {
	var sQuerySplit;
	var sSplit;
	var sSplitPair;
	var sCreateValues;
	var QueryValue;
	sQuerySplit = sDocumentLocation.split('?');
	if(sQuerySplit.length > 1) {
		sSplit = sQuerySplit[1].split('&');
		if(iPair < sSplit.length+1) {
			sSplitPair = sSplit[iPair-1];
			sCreateValues = sSplitPair.split('=');
			QueryValue = sCreateValues[1];
		} else {
			QueryValue = '';
		}
	} else {
		QueryValue = '';
	}
	return QueryValue;
}

var iProcess = parseQuery(1);

var sProcess = new Array();
sProcess[0] = "";
sProcess[1] = new Array("BUSINESS FILING SERVICES","Incorporation");
sProcess[2] = new Array("BUSINESS FILING SERVICES","LLC");
sProcess[3] = new Array("ESTATE PLANNING DOCUMENTS","Living Trust");
sProcess[4] = new Array("DIVORCE","Divorce");
sProcess[5] = new Array("","Prenuptial");
sProcess[6] = new Array("ESTATE PLANNING DOCUMENTS","Last Will and Testament");
sProcess[7] = new Array("INTELLECTUAL PROPERTY","Trademark");
sProcess[8] = new Array("INTELLECTUAL PROPERTY","Copyright");
sProcess[9] = new Array("ESTATE PLANNING DOCUMENTS","Living Will");
sProcess[10] = "";
sProcess[11] = new Array("ESTATE PLANNING DOCUMENTS","Power of Attorney");
sProcess[12] = new Array("US CITIZENSHIP","Citizenship");
sProcess[13] = "";
sProcess[14] = "";
sProcess[15] = new Array("NAME CHANGE","Name Change");

function GoSniffer(iProcess)
{
	var useragent = navigator.userAgent;
	var bName = (useragent.indexOf('Opera') > -1) ? 'Opera' : navigator.appName;
	var pos = useragent.indexOf('MSIE');
	if (pos > -1) {
	bVer = useragent.substring(pos + 5);
	var pos = bVer.indexOf(';');
	var bVer = bVer.substring(0,pos);
	}
	var pos = useragent.indexOf('Opera');
	if (pos > -1)	{
	bVer = useragent.substring(pos + 6);
	var pos = bVer.indexOf(' ');
	var bVer = bVer.substring(0, pos);
	}
	if (bName == "Netscape") {
	var bVer = useragent.substring(8);
	var pos = bVer.indexOf(' ');
	var bVer = bVer.substring(0, pos);
	}
	if (bName == "Netscape" && parseInt(navigator.appVersion) >= 5) {
	var pos = useragent.lastIndexOf('/');
	var bVer = useragent.substring(pos + 1);
	}

	if(bName == "Microsoft Internet Explorer" ||
	   (bName == "Netscape" && bVer > 6)) {
		document.location.href="ldc_iframe.htm?iprocess=" + iProcess;
	} else {
		document.location.href="ldc_frames.htm?iprocess=" + iProcess;
	}

}

function GoToPage(iPage)
{
	switch (iPage){
		case 1:
			document.location.href="ldc_3.htm";
			break;
		case 2:
			document.location.href="ldc_5.htm";
			break;
		case 3:
			document.location.href="ldc_4.htm";
			break;
		case 4:
			document.location.href="ldc_7.htm";
			break;
		case 5:
			document.location.href="ldc_6.htm";
			break;
		<!-- case 0:
			document.location.href="ep_ind-s.htm";
		break; -->

	}
}

function GoToNPage(iPage)
{
	switch (iPage){
		case 1:
			top.document.location.href="ldc_n_3.html";
			break;
		case 2:
			top.document.location.href="ldc_n_5.html";
			break;
		case 3:
			top.document.location.href="ldc_n_4.html";
			break;
		case 4:
			top.document.location.href="ldc_n_7.html";
			break;
		case 5:
			top.document.location.href="ldc_n_6.html";
			break;
		case 0:
			top.document.location.href="ep_ind-n.htm";
		break;

	}
}

function GoToUPage(iPage)
{
	switch (iPage){
		case 1:
			document.location.href="../ldc_3.htm";
			break;
		case 2:
			document.location.href="../ldc_5.htm";
			break;
		case 3:
			document.location.href="../ldc_4.htm";
			break;
		case 4:
			document.location.href="../ldc_7.htm";
			break;
		case 5:
			document.location.href="../ldc_6.htm";
			break;
		case 0:
			document.location.href="../ep_ind-s.htm";
		break;

	}
}
