var g_Wizard;

window.onload = window_onload;
function window_onload() {
	try {
		g_Wizard = window.parent.Wizard;	// Get a reference to the external wizard object
	
		document.body.className = "IFRAME";

		window.Update = UpdateHandler;		// Add reference to allow external Update of this IFRAME
		window.GetHeight = GetHeight;		// Add reference to allow external sizing of this IFRAME
		try { window.SaveData = IFrame_SaveData }
		catch(e) { }

		document.onselectstart = document_onselectstart;
		document.ondragstart = document_ondragstart;
	
		try { IFrame_onload() }
		catch(e) { }
		
		UpdateHandler();
	}
	catch(e) {
	}
}

function UpdateHandler() {
	try { IFrame_Update(); }
	catch(e) { }
	g_Wizard.ResizeIFRAME( window.name );
}
function GetHeight() {
	try {
		var oTextRange = document.body.createTextRange();
		return oTextRange.boundingHeight;
	}
	catch(e) {
		return null;
	}
}

function document_onselectstart() {
	if( window.event.srcElement.tagName.toLowerCase() == "input") return true;
	return( false );
}
function document_ondragstart() { return false }
