var strActiveMenuId; 
strActiveMenuId = "home";
var mstrActiveLeftMenuID = "spnHome";

function MouseOver(obj)
{
	obj.className = "activemenu";
}
function MouseOut(obj)
{
	if(strActiveMenuId != obj.id)
		obj.className = "initialmenu";
}
function MouseClick(obj)
{

	var strActivePageLink;
	
	switch(obj.id)
	{
		case "home":
			strActivePageLink = "presentation.html";
			break;
		case "features":
			strActivePageLink = "features.html";
			break;
		case "downloads":
			strActivePageLink = "downloads.html";
			break;
		case "samples":
			strActivePageLink = "ibmodeler2/samplemodels/index.html";
			break;
		case "tutorials":
			strActivePageLink = "tutorials/tutorials.html";
			break;
		case "helpfiles":
			strActivePageLink = "helpfiles/index.html";
			break;
		case "supportingtools":
			strActivePageLink = "supportingtools.html";
			break;
		case "buy":
			strActivePageLink = "buy.html";
			break;
	}
	document.getElementById("activepage").src = strActivePageLink;	
}

function SetActiveMenu(strMenuId)
{
	//Resize the iframe
	var iframe = document.all.activepage; 
     iframe.height=document.frames("activepage").document.body.scrollHeight; 
	 document.frames("activepage").document.scrollIntoView;
    	
	if(strMenuId == strActiveMenuId)
		return;

	document.getElementById(strActiveMenuId).className = "initialmenu";
	strActiveMenuId = strMenuId;
	document.getElementById(strMenuId).className = "activemenu";
}

function ActivatePage(strId)
{
	var obj;
	objMenu = document.getElementById(strId);
	MouseClick(objMenu);
}

function OnLoad()
{
	document.getElementById("activepage").src = "presentation.html";
}


function fnOnLeftLinkClick(strPageLink, objCalledFrom)
{
	//if(objCalledFrom.id == mstrActiveLeftMenuID)
	//	return;
	document.getElementById("activepage").src = strPageLink;	
	document.getElementById(mstrActiveLeftMenuID).className = "normalleftlink";
	//objCalledFrom.className = "activeleftlink";
	//mstrActiveLeftMenuID = objCalledFrom.id;
	
}