var isIE = (document.getElementById && document.all)?true:false;
var isNS4 = (document.layers)?true:false;
var isNS6 = (document.getElementById && !document.all)?true:false;
function myGetElementById (id)
{
    if ( isIE )
    {
	var str = "document.all('" + id + "')";
	var o = eval(str);
	return o;
    }

    return document.getElementById(id);
}

var pageWidth;
var pageHeight;

function findDimensions ()
{
    var frameWidth;
    var frameHeight;
    var obj;

    if (self.innerWidth)
    {
	frameWidth = self.innerWidth;
	frameHeight = self.innerHeight;
    }
    else if (document.documentElement && document.documentElement.clientWidth)
    {
	frameWidth = document.documentElement.clientWidth;
	frameHeight = document.documentElement.clientHeight;
    }
    else if (document.body)
    {
	frameWidth = document.body.clientWidth;
	frameHeight = document.body.clientHeight;

    }
    else
	return;

    // if there's valid info, update the globals so they can be used elsehere
    pageWidth = frameWidth;
    pageHeight = frameHeight;

    if ( (obj = myGetElementById('background')) )
    {
	obj.style.width = frameWidth;
	obj.style.height = frameHeight;
    }

    if ( (obj = myGetElementById('background_image')) )
    {
	var iWidth = obj.width; 
	var iHeight = obj.height;
	var iRatio = iWidth / iHeight;
	var fRatio = frameWidth / frameHeight;	

	// reset to default position on resize/load
	obj.style.top = obj.style.left = 0;

	if ( iRatio < fRatio ) 
	{
	    obj.style.width = frameWidth;
	    obj.style.height = frameWidth / iRatio;
	} 
	else 
	{
	    obj.style.height = frameHeight;
	    obj.style.width = frameHeight * iRatio;
	}
    }
}

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 imgOn(imgName) {
			if (document.images) {
			document[imgName].src = "images/" + imgName + "on.png";
			}
		}

		function imgOff(imgName) {
			if (document.images) {
			document[imgName].src = "images/" + imgName + "off.png";
			}
		}
		
function switchVisible(synopsis,fullstory){
	document.getElementById(synopsis).style.display='none';
	
	document.getElementById(fullstory).style.display='block';
	document.getElementById(fullstory).style.visibility='visible';
}
function makeInvisible(story_invisible, syn_visible){
	document.getElementById(story_invisible).style.display='none'
	document.getElementById(syn_visible).style.display='block'
}
function checkVisible(synopsis,fullstory){
var f=1
for (f=1;f<=3;f++)
{
makeInvisible("news" + f,"newscopy" + f);
switchVisible(synopsis,fullstory);
}
}