<!--///////////// mecromedia generated code ////////////////////////
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

/////////////////// manually set content in the middle of the page ////////////////////

function setPageToMiddle () {
	var isNN = (navigator.appName.toLowerCase().indexOf('netscape') >= 0) ? true : false;
	var isIE = (navigator.appName.toLowerCase ().indexOf ('microsoft') >= 0) ? true : false;
	//var brow = (isIE == isNA) ? 'ud' : ((isIE == true ? 'ie' : 'ud') || (isNA == true ? 'na' : 'ud'));
	var isAny = (isIE) ? "IE" : ((isNN) ? "NN" : "Other")
	if (isNN) {
		var topSpace = document.getElementById ("spaceTop");
		//alert (topSpace);
		var botSpace = document.getElementById ("spaceBot");
		topSpace.height = parseFloat (window.innerHeight / 8);
		botSpace.height = parseFloat (window.innerHeight / 8);
		//alert (window.innerHeight);
		//document.title = topSpace.height;
		//document.location.reload ();
	}
	else if (isIE) {
		//alert (browser.indexOf ('i'));
		document.images ("spaceTop").style.height = parseFloat (document.body.offsetHeight / 8);
		document.images ("spaceBot").style.height = parseFloat (document.body.offsetHeight / 8);
	//document.title = "Top : " + document.images ("spaceTop").style.height + " & Bot : " + document.images ("spaceBot").style.height;
	}
}

////////////////////////////// Preview appropriate images in the left pane. ///////////////
/*##########################################################################################
### Modified: December 29, 2005. Some changes have been made for optimization.
All the preload work has been removed and assigned to a function 'preloadImgs' which lessons
the bothoration by preloading each image parallely while displaying thumbonails, instead of
at the time of ACTUAL 'pre'viewing.! Infact why the user should wait for the preview image
to download or click 2-3 times out of curiocity when we can do this work in advance..?
############################################################################################*/
var prevImgs = new Array ();
function previewImg (theImg) {
	var prevuImg = document.all ? document.images ("imgPreview") : document.getElementById ("imgPreview");
	var txtImg = document.all ? document.all ("imgText") : document.getElementById ("imgText");
	//var pImg = new Image (); //### This is really now not necessary since preload is already done
	var strFontStart = "<font face='verdana,arial,sans-serif' size='1' color='#999999'>", strFontEnd = "</font>";
	//var txtImg = thisImg.getAttribute ("alt");
	//pImg.src = newSRC;
	//alert (prevImgs [theImg].src);
	prevuImg.src = prevImgs [theImg].src;//pImg.src;
	prevuImg.width = prevImgs [theImg].width; prevuImg.height = prevImgs [theImg].height;
	//if (document.all) document.all.ImgText.innerHTML = strFontStart + txtImg + strFontEnd;
	//else document.getElementById ("ImgText").innerHTML = strFontStart + txtImg + strFontEnd;
	//txtImg.innerHTML = strFontStart + "Displaying" + strFontEnd;
}

/*###################################################################################################
This 'preloadImgs' saves the essential time for download of each previwable image by doing concurrent preload for
each of the currently downloading thumbonail used as clickable image-buttons of preview image. Flexible
enough that there is even no need to give it any 'hard-coded' name as image as argument.
####################################################################################################*/
function preloadImgs (theImg) {
	var theSRC, newSRC; 
	var thisImg = document.all ? document.all (theImg) : document.getElementById (theImg);
	var iIndx = theImg.substring (theImg.indexOf ("_")+1,theImg.length);
	prevImgs [theImg] = new Image ();
	theSRC = thisImg.src;
	newSRC = theSRC.replace (theSRC.substring (theSRC.indexOf ("smalls"), theSRC.lastIndexOf ("/")),"bigs");
	prevImgs [theImg].src = newSRC;
	//newWid = pImg.getAttribute ("width"); newHig = pImg.getAttribute ("height");
	//prevImgs [iStaticIndx].width = newWid; prevImgs [iStaticIndx].height = newHig;
}

function showMap () {
	var theImg = showMap.arguments [0];
	var intWid = "width=" + showMap.arguments [1];
	var intHig = "height=" + showMap.arguments [2], intLeft = "left=0", intTop = "top=0";
	var theFeatures = "" + intWid + "," + intHig + "," + intLeft + "," + intTop;
	var theWin = open (theImg,'_blank',theFeatures);
	//alert (theWin.document.body.style.marginLeft);
	theWin.document.body.style.marginLeft=0;
	theWin.document.body.style.marginTop=0;
	theWin.document.title = "Map view ::";
}

var isMouseOver;
var iTimer = 0;
var newsDiv = "divNews";
var iDiffHeight = 0;
function getDiv () {
	var theDiv = document.all ? document.all [newsDiv] : document.getElementById (newsDiv);
	return theDiv;
}

function initNews () {
	var theDiv = getDiv ();
	if (theDiv) {
		theDiv.style.left = 0;theDiv.style.top = 0;
		iDiffHeight = theDiv.offsetHeight - getHeight (theDiv.offsetParent);
	}
	else return false;
	//alert (theDiv.offsetParent.offsetHeight);
}

function setMouseState () {
	isMouseOver = setMouseState.arguments [0];
}

function scrollNews () {
	var scrollDir = scrollNews.arguments [0];
	var theDiv = getDiv ();
	//alert ((theDiv.style.height) + ":" + theDiv.offsetParent.style.height);
	clearInterval (iTimer);
	iTimer = setInterval (eval ("scroll" + scrollDir),15);
}

function scrollUP () {
	if (isMouseOver) {
		var theDiv = getDiv ();
		if (Math.abs (getTop (theDiv)) < iDiffHeight) {
			theDiv.style.top = (getTop (theDiv)-1) + "px";
		}
	}
	else {clearInterval (iTimer);}
}

function scrollDOWN () {
	if (isMouseOver) {
		var theDiv = getDiv ();
		//alert (getTop (theDiv));
		if (getTop (theDiv) < 0) {
			theDiv.style.top = (getTop (theDiv)+1) + "px";
		}
	}
	else {clearInterval (iTimer);}
}

function getHeight (theObj) {
	return Number ((theObj.style.height.indexOf ("px") ? theObj.style.height.substring (0,theObj.style.height.indexOf ("px")):theObj.style.height));
}

function getTop (theObj) {
	return Number ((theObj.style.top.indexOf ("px") ? theObj.style.top.substring (0,theObj.style.top.indexOf ("px")):theObj.style.top));	
}
	
function timepass () {
	for (var iTimer=0;iTimer < 5800000;iTimer ++);
}
//-->