/**
 *
 * @created on 09/08/2006
 * @author Mike Kelly
 * @contact mikee@whatsthat.co.nz
 *
 **/

function reloadTop()
{
    top.location.reload();

}

function redirectTop(redirectTo,redirectIn)
{
    if (redirectIn == 0)
    {
        top.location.replace(redirectTo);
    }
    else
    {
        setTimeout("redirectTop('" + redirectTo + "',0)", redirectIn*1000);
    }

}

function openTarget(strURL,strType,strHeight,strWidth,target)
{

    var strOptions="";
    if (strType=="self") strOptions="";
    if (strType=="console") strOptions="resizable,height="+strHeight+",width="+strWidth;
    if (strType=="fixed") strOptions="status=no,resizable=yes,scrollbars=yes,height="+strHeight+",width="+strWidth;
    if (strType=="elastic") strOptions="toolbar,menubar,scrollbars,resizable,location,height="+strHeight+",width="+strWidth;
    window.open(strURL, target, strOptions);
}

function passBack(strTargetField,strValue)
{

	window.opener.document.getElementById(strTargetField).value = strValue;

}

function populateOpener(strFormTarget,strFieldTarget,strId)
{
	window.opener.document.getElementById(strFieldTarget).value = strId;
	window.opener.document.getElementById(strFormTarget).submit();
	window.close();

}
