function openNewWindow(aDocument, aHeight, aWidth, aTitle) 
{
	var newWin = window.open(aDocument,'','height='+aHeight+',width='+aWidth+',left=0,top=0,menubar,resizable,scrollbars');
	newWin.document.bgColor='#E8E2D4';
	newWin.document.title=aTitle;
}

function getLatestNews(){
var LatestNews='';
		LatestNews ='<iframe width="790" height="20" background-image="url(Menu/bg_20.gif);" src="Menu/LatestNews_Scroll.html" SCROLLING="no" FRAMEBORDER="0" border=1 ></iframe>';
		return LatestNews; 
}

function getAdvertisments(){
var advertisments='';
		advertisments ='<iframe width="150" height="90" src="Menu/Advertisments_Scroll.html"  bgcolor="#E3F1FE" SCROLLING="no" FRAMEBORDER="0" border=0></iframe>';
		return advertisments; 
}

function getNewsLetter(){
var newsLetter='';
		newsLetter ='<iframe width="150" height="130" src="Menu/NewsLetter_Scroll.html" SCROLLING="no" FRAMEBORDER="0" border=0>test</iframe>';
		return newsLetter; 
}


//Function for Rotating images in banner Area
var imgIndex=0;
var Rotation=1;
var timeOut=800;
var aAltText = new Array();
aAltText[0]='First Image';
aAltText[1]='Second Image';
aAltText[2]='Third Image';
aAltText[3]='Fourth Image';
aAltText[4]='Fifth Image';
aAltText[5]='Sixth Image';
aAltText[6]='Seventh Image';
aAltText[7]='Eighth Image';
aAltText[8]='Nineth Image';
//aAltText[10]='Tenth Image';
//aAltText[11]='Eleventh Image';
//aAltText[12]='Twelevth Image';
//aAltText[13]='Thirteenth Image';
//aAltText[14]='Fourteenth Image';
function toggleImg() {
 var ImgRotator = document.getElementById("ImgRotator");

	if (Rotation=1) {
		if (imgIndex>=aAltText.length)
			imgIndex=0;
		ImgRotator.src='images/SwapImage_' +imgIndex+'.gif';
		ImgRotator.alt=aAltText[imgIndex];
		imgIndex++;
	}
	setTimeout('toggleImg()', timeOut);
}

function ConvertRowsToLinks(xTableId){

        var rows = document.getElementById(xTableId).getElementsByTagName("td");
   
        for(i=0;i<rows.length;i++){
          var link = rows[i].getElementsByTagName("a")
          if(link.length == 1){
            rows[i].onclick = new Function("document.location.href='" + link[0].href + "'");
            //rows[i].onmouseover = new Function("this.className='highlight'");
            //rows[i].onmouseout = new Function("this.className=''");
          }
        }

      }


function start(){
        ConvertRowsToLinks("LeftSideBarTable");
        ConvertRowsToLinks("IndexBottom");
        
 }
window.onload = start;
window.status="Multi Professional Housing Society (Regd.) Islamabad";

