/* mir-f.js

(C) 2004 A. Sean Pue

Used by frames directly out of mainFrame

*/
function setDocFont(fonttype,newfontvalue){

	if (!document.styleSheets) return;

	var theRules = new Array();
	if (document.styleSheets[0].cssRules){
		theRules = document.styleSheets[0].cssRules}
	else if (document.styleSheets[0].rules){
		theRules = document.styleSheets[0].rules}
	else return;
for (i=0;i<theRules.length;i++){

	if (theRules[i].selectorText!=null) {
		if (theRules[i].selectorText.indexOf(fonttype)!=-1)

		{
			theRules[i].style.fontFamily=newfontvalue;
	      break;
		}
	}	
}

}

function setupFrameVariables() {
try{
		setDocFont("urdufont",parent.topFrame.getUrduFontFamily());
		setDocFont("romanfont",parent.topFrame.getRomanFontFamily());
		setDocFont("transfont",parent.topFrame.getTransFontFamily());
setDocFont("devanagarifont",parent.topFrame.getDevanagariFontFamily());}
catch (er) {
// Rather unfortunate, but possible that font settings won't load for introduction-e.htm if mirtop not already loaded... Since just roman fonts, not a major problem.
	
}
}

function getUrduFontFamily() {

	return parent.topFrame.getUrduFontFamily();
}
function getRomanFontFamily() {
	return parent.topFrame.getRomanFontFamily();
}
function getDevanagariFontFamily() {
	return parent.topFrame.getDevanagariFontFamily();
}
function getTransFontFamily() {
return parent.topFrame.getTransFontFamily();
}

setupFrameVariables();
