/*
function goPage(whichForm,whichPage) {
 var i=whichForm.selectedIndex;
 	if (i!=0) {
 		var j=whichForm.options[i].value;
       window.location.href=j;
	}
}

*/

function replace(string,text,by) {
// Replaces text with by in string
    var strLength = 600, txtLength = text.length;
    if ((strLength == 0) || (txtLength == 0)) return string;

    var i = string.indexOf(text);
    if ((!i) && (text != string.substring(0,txtLength))) return string;
    if (i == -1) return string;

    var newstr = string.substring(0,i) + by;

    if (i+txtLength < strLength)
        newstr += replace(string.substring(i+txtLength,strLength),text,by);

    return newstr;
}



function CleanURL(ParentURL, WhichWindow)
{
if(WhichWindow == 'opener'){var windowLocation = new String(opener.location.toString());}
if(WhichWindow == 'window'){var windowLocation = new String(window.location.toString());}
if(WhichWindow == 'Frame0'){var windowLocation = new String(parent.Frames[0].toString());}
if(WhichWindow == 'Frame1'){var windowLocation = new String(parent.Frames[1].toString());}
if(WhichWindow == 'Frame2'){var windowLocation = new String(parent.Frames[2].toString());}
if(WhichWindow == 'Frame3'){var windowLocation = new String(parent.Frames[3].toString());}



var parsingElement = windowLocation.indexOf( "?" );
var parameters = new Array();
var parameterValue = windowLocation.substring( parsingElement + 1 );
var TemporaryParam = new Array();
parameters = parameterValue.split( "&" );

for(i=0; i <  parameters.length; i++)
{
TemporaryParam = parameters[i].split( "=");

if (TemporaryParam[0] == ParentURL)
{
    if (TemporaryParam[1] == null){return "";} 
else{
var newstring = TemporaryParam[1];
    newstring = replace(newstring,"%20"," ");
return newstring;

}
}
                                     }

}

