// Code written by MJA Visser, for more info: mjavisserREMOVETHIS@hotmail.com
//this file should be included in any content html document

//if in any spurious frames break out
if(top.window.frames.length > 2) {
	top.window.location.href = document.location.href;
}
//if we're a frame short create it
if(top.window.frames.length < 2) { 
	top.window.location.href = '../home.html?lang=' + lang + '&itemID=' + itemID;
}

//is menu.html in the 'menu' frame and does frame 'content' exist?
if( (top.window.frames[0].name != "menu") || (top.window.frames[1].name != "content") ) {
	top.window.location.href = '../home.html?lang=' + lang + '&itemID=' + itemID;
}

//check if the language selected ok
if(top.window.lang != lang) {
	top.window.frames[0].window.languageChange(lang,false);
}
//check if the menu item selected is ok
if(top.window.currentItem != itemID) {
	top.window.frames[0].window.menuItemChange(itemID,false);
} 

//set the title appropriate
top.window.createTitle(lang);


