// JavaScript Document
//alert("1\r|"+ parent.window.document.title +"|")
//alert("1\r|"+ window.document.location.href +"|")

var baseLoc, parentLoc, whereAmI, incomingID
baseLoc = window.document.location.href
parentLoc = parent.window.document.location.href
whereAmI =  parentLoc.substr(parentLoc.length-10,5)

incomingID = parentLoc.substr(parentLoc.length-6,1)
//alert(parentLoc + "\r\n" +  incomingID + "\r\n" + Number(incomingID));
//alert(Number(incomingID));
//there is no frame
if(Number(incomingID)>-1){
	baseLoc = baseLoc.substr(0, baseLoc.length-10)
	if(baseLoc.indexOf("file:///")==0){
		baseLoc = baseLoc.substr(8);
	}
	//alert("1\r|"+ baseLoc + "index.html?pageId=" + incomingID +"|")
	window.document.location.replace(baseLoc + "index.html?pageId=" + incomingID);
}
