﻿// Ogden Publications Scripts
// All scripts are written for our use only

// php ads script
function phpads_deliverActiveX(content)
{
	document.write(content);	
}

// pop-up window of set size
function ContentPopUpWindow (url, hWind, nWidth, nHeight) 
{
	var cToolBar = "toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,width=" + nWidth + ",height=" + nHeight;
	var popupwin = window.open(url, hWind, cToolBar);
}

function toggle_on(id) 
{
    document.getElementById('initial_' + id).style.display = "none";
    document.getElementById('full_' + id).style.display = "block";
}

function toggle_off(id) 
{
    document.getElementById('initial_' + id).style.display = "block";
    document.getElementById('full_' + id).style.display = "none";
}

function SetUniqueRadioButton(nameregex, current)
{
	re = new RegExp(nameregex); 
	for(i = 0; i < document.forms[0].elements.length; i++)
	{
		elm = document.forms[0].elements[i];
		if (elm.type == 'radio')
		{
			if (re.test(elm.name))
			{
				elm.checked = false;
			}
		}
	}
	current.checked = true;
}