<!-- MPI FASTT Dynamic Navigation -->
var sortField;
function getName(cookie_name) {
    if(document.cookie)
   {
        index = document.cookie.indexOf(cookie_name);
        if (index != -1)
     {
            namestart = (document.cookie.indexOf("=", index) + 1);
            nameend = document.cookie.indexOf(";", index);
            if (nameend == -1) {nameend = document.cookie.length;}
            SetCo = document.cookie.substring(namestart, nameend);
            return SetCo;
           }
        }
}

sortField=getName("SortField");

document.write("<div id=\"right-ad\" style=\"position:absolute; left:810px; top:160px; width:160px;\">");

if (document.domain == "www.mpicoin.com")
{
	if (sortField == "CUL" || sortField == "CULM")
	{
		if("https:" == document.location.protocol)
		{
			// credit union home page (no e-commerce; do not display ordering capabilities)
			//document.write("<iframe src =\"https://www.mpicoin.com/navigation/creditunion-no-commerce.html\" width=\"160\" height=\"800\" scrolling=\"no\" frameborder=\"0\" allowtransparency=\"yes\"><p>Your browser does not support iframes.</p></iframe>");
		}
		else
		{
			// credit union home page (no e-commerce; do not display ordering capabilities)
			//document.write("<iframe src =\"http://www.mpicoin.com/navigation/creditunion-no-commerce.html\" width=\"160\" height=\"800\" scrolling=\"no\" frameborder=\"0\" allowtransparency=\"yes\"><p>Your browser does not support iframes.</p></iframe>");
		}
	}
	else if (sortField == "CULE")
	{
		if("https:" == document.location.protocol)
		{
			// credit union league home page
			//document.write("<iframe src =\"https://www.mpicoin.com/navigation/creditunion.html\" width=\"160\" height=\"800\" scrolling=\"no\" frameborder=\"0\" allowtransparency=\"yes\"><p>Your browser does not support iframes.</p></iframe>");
		}
		else
		{
			// credit union league home page
			//document.write("<iframe src =\"http://www.mpicoin.com/navigation/creditunion.html\" width=\"160\" height=\"800\" scrolling=\"no\" frameborder=\"0\" allowtransparency=\"yes\"><p>Your browser does not support iframes.</p></iframe>");
		}
	
	}
	else if (sortField == "E")
	{
		if("https:" == document.location.protocol)
		{
			// employee home page
			document.write("<iframe src =\"https://www.mpicoin.com/ads/category-right-ad.aspx\" width=\"160\" height=\"800\" scrolling=\"no\" frameborder=\"0\" allowtransparency=\"yes\"><p>Your browser does not support iframes.</p></iframe>");
		}
		else
		{
			// employee home page
			document.write("<iframe src =\"http://www.mpicoin.com/ads/category-right-ad.aspx\" width=\"160\" height=\"800\" scrolling=\"no\" frameborder=\"0\" allowtransparency=\"yes\"><p>Your browser does not support iframes.</p></iframe>");
		}
	}
	else
	{
		if("https:" == document.location.protocol)
		{
		// sortField == "W"
		// bank home page
		//document.write("<iframe src =\"https://www.mpicoin.com/navigation/bank.html\" width=\"160\" height=\"800\" scrolling=\"no\" frameborder=\"0\" allowtransparency=\"yes\"><p>Your browser does not support iframes.</p></iframe>");
		}
		else
		{
				// sortField == "W"
		// bank home page
		//document.write("<iframe src =\"http://www.mpicoin.com/navigation/bank.html\" width=\"160\" height=\"800\" scrolling=\"no\" frameborder=\"0\" allowtransparency=\"yes\"><p>Your browser does not support iframes.</p></iframe>");
	
		}
	}
}
else
{
	if("https:" == document.location.protocol)
	{
	// retail shopping page (secure)
	//document.write("<iframe src =\"https://www.coinsofamerica.com/navigation/retail.html\" width=\"160\" height=\"800\" scrolling=\"no\" frameborder=\"0\" allowtransparency=\"yes\"><p>Your browser does not support iframes.</p></iframe>");
	}
	else
	{
	// retail shopping page
	//document.write("<iframe src =\"http://www.coinsofamerica.com/navigation/retail.html\" width=\"160\" height=\"800\" scrolling=\"no\" frameborder=\"0\" allowtransparency=\"yes\"><p>Your browser does not support iframes.</p></iframe>");
	}
}

document.write("</div>");
