

function SetTopText(TopImgText) {

var TopImg, TopImgSrc;
var r,re;	
var browsername;

	browsername = navigator.appName;
	if (browsername.indexOf("Netscape")!=-1) {browsername="NS"}
	else
	{if (browsername.indexOf("Microsoft")!=-1) {browsername="MSIE"}
	else {browsername="MSIE"}};

	//alert(browsername);

	if ( browsername == "MSIE" ) { 

		// bring the img object
		TopImg = parent.frames("topFrame").document.images("TopImg");
		
		// bring the source of the image
		TopImgSrc = TopImg.src;	
	
		re = new RegExp("/" + TopImgText,"i");
		
		// search if into the image source there is the text of the TopImgText
		r = TopImgSrc.match(re);	
		
		// if no, loading the new TopImgText
		if ( r == null ) { 
			TopImg.src = "ITimages/" + TopImgText + ".jpg";
			//alert("images/" + TopImgText + ".jpg");
		}
	
	}
	
	else {
		
		// bring the img object
		TopImg = parent.frames['topFrame'].document.images['TopImg'];
		
		// bring the source of the image
		TopImgSrc = TopImg.src;	
		
		re = new RegExp("/" + TopImgText,"i");
		
		// search if into the image source there is the text of the TopImgText
		r = TopImgSrc.match(re);	
		
		// if no, loading the new TopImgText
		if ( r == null ) { 
			TopImg.src = "ITimages/" + TopImgText + ".jpg";
			//alert("ITimages/" + TopImgText + ".jpg");
		}
		
	}

}

function OpenWindow(pUrl,pTitle,pWidth,pHeight)
{
var mywin

mywin = window.open(pUrl,null,'left=0,top=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1');
mywin.resizeTo(pWidth,pHeight);
mywin.focus();
}

function SetSrcImg(pName,pUrl,pTitle)
{

document.images(pName).src = pUrl;
document.title = pTitle;

}

function AlertMSG(pStr)
{

alert(pStr);

}
