var lastW = 0

       var ie = false, n4 = false, n6 = false;

       if (document.all) {  //IE4,IE5

        ie = true;

       } else if (document.getElementById) {  //N6.x,Mozilla?

        n6 = true;

       } else if (document.layers) {  //NN4.7x

        n4 = true;

	   }

	   

function getFlashMovieObject(movieName)

{

  if (window.document[movieName]) 

  {

      return window.document[movieName];

  }

  if (navigator.appName.indexOf("Microsoft Internet")==-1)

  {

    if (document.embeds && document.embeds[movieName])

      return document.embeds[movieName]; 

  }

  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)

  {

    return document.getElementById(movieName);

  }

}

	   

		 function shvi(numer,coz) {

		  id = "";

		     if (ie) {

		       if (coz) {

			  document.all(id+numer).style.visibility='visible';

			} else {

			  document.all(id+numer).style.visibility='hidden';

			}

		     } else if (n6) {

		       if (coz) {

		         document.getElementById(id+numer).style.visibility = "visible";

			} else {

		         document.getElementById(id+numer).style.visibility = "hidden";

			}

		     } else if (n4) {

		       if (coz) {

		         document.layers[id+numer].visibility = "show";

			} else {

		         document.layers[id+numer].visibility = "hide";

			}

		     }	  

		 }



var aCounter = 0;



function setCounter() {

   aCounter = 1080;

}



function decCounter() {

  aCounter = 2;

}



function checkCounter() {

   if (aCounter>0) {

     aCounter--;

	 if (aCounter==1) {

	   changeImages('gdm_top_02', 'images/gdm_top_02-out.jpg');

	   changeImages('gdm_top_03', 'images/gdm_top_03-out.jpg');

	   shvi('topMenu1',0);

  	   shvi('topMenu2',0);

	 }

   }

   

	if (typeof document.documentElement != 'undefined'

	     && typeof document.documentElement.clientWidth !=

	     'undefined' && document.documentElement.clientWidth != 0)

	 {

	       viewportwidth = document.documentElement.clientWidth,

	       viewportheight = document.documentElement.clientHeight

	 }

	 else if (typeof window.innerWidth != 'undefined')

	 {

	      viewportwidth = window.innerWidth,

	      viewportheight = window.innerHeight

	 }

	 

	 // older versions of IE

	 

	 else

	 {

	       viewportwidth = document.getElementsByTagName('body')[0].clientWidth,

	       viewportheight = document.getElementsByTagName('body')[0].clientHeight

	 }



   

   if (lastW != viewportwidth) {

     lastW = viewportwidth;

     positioning();

   }

}





setInterval("checkCounter();", 100);



function newImage(arg) {

	if (document.images) {

		rslt = new Image();

		rslt.src = arg;

		return rslt;

	}

}



function changeImages() {

	if (document.images && (preloadFlag == true)) {

		for (var i=0; i<changeImages.arguments.length; i+=2) {

			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];

			if (changeImages.arguments[i]=="gdm_top_02") {

			  shvi('topMenu1',1);

			  shvi('topMenu2',0);

			}

			if (changeImages.arguments[i]=="gdm_top_03") {

			  shvi('topMenu2',1);

			  shvi('topMenu1',0);

			}

			

			setCounter();

		}

	}

}



function pageWidth() {

  return window.innerWidth != null ? window.innerWidth : document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body != null ? document.body.clientWidth : null;

}



function f_clientWidth() {

	return f_filterResults (

		window.innerWidth ? window.innerWidth : 0,

		document.documentElement ? document.documentElement.clientWidth : 0,

		document.body ? document.body.clientWidth : 0

	);

}



function moveIt(obj, mvTop, mvLeft) {

	obj.style.position = "absolute";

	obj.style.top = mvTop;

	obj.style.left = mvLeft;

}



function getScrollX() {

  var scrOfX = 0, scrOfY = 0;

  if( typeof( window.pageYOffset ) == 'number' ) {

    //Netscape compliant

    scrOfY = window.pageYOffset;

    scrOfX = window.pageXOffset;

  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {

    //DOM compliant

    scrOfY = document.body.scrollTop;

    scrOfX = document.body.scrollLeft;

  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {

    //IE6 standards compliant mode

    scrOfY = document.documentElement.scrollTop;

    scrOfX = document.documentElement.scrollLeft;

  }

  return scrOfX;

}



function positioning() {

    var half1

	half1 = viewportwidth-1200;

	if (half1<0) half1 = 0;

	
if(document.getElementById("topMenu1")){
    moveIt(topMenu1,32,(half1)/2+250);
}
if(document.getElementById("topMenu2")){
	moveIt(topMenu2,32,(half1)/2+599);
}
	if(document.getElementById("book1")){
	moveIt(book1,259,(half1)/2+155);
	}

	
if(document.getElementById("flashVideo")){
   getFlashMovieObject("flashVideo").getWidthOfWindow(viewportwidth+getScrollX());
}
}



var viewportwidth;

var viewportheight;



var preloadFlag = false;

function preloadImages() {

	if (document.images) {

		gdm_top_02_over = newImage("images/gdm_top_02-over.jpg");

		gdm_top_03_over = newImage("images/gdm_top_03-over.jpg");

		gdm_footer_05_over = newImage("images/gdm_footer_05-over.gif");

		gdm_footer_08_over = newImage("images/gdm_footer_08-over.gif");

		gdm_footer_right_07_over = newImage("images/gdm_footer_right_07-over.gif");

		preloadFlag = true;

	}

 

	

	if (typeof document.documentElement != 'undefined'

	     && typeof document.documentElement.clientWidth !=

	     'undefined' && document.documentElement.clientWidth != 0)

	 {

	       viewportwidth = document.documentElement.clientWidth,

	       viewportheight = document.documentElement.clientHeight

	 }

	 else if (typeof window.innerWidth != 'undefined')

	 {

	      viewportwidth = window.innerWidth,

	      viewportheight = window.innerHeight

	 }

	 

	 // older versions of IE

	 

	 else

	 {

	       viewportwidth = document.getElementsByTagName('body')[0].clientWidth,

	       viewportheight = document.getElementsByTagName('body')[0].clientHeight

	 }

	 

	lastW = viewportwidth;

	

	positioning();

}





function changecolor(id,newcolor){

if (newcolor=='#fecd04') setCounter(); else decCounter();

if (document.getElementById) 

  {document.getElementById(id).style.backgroundColor = newcolor; return;

}



if(document.layers){ // browser="NN4";

  document.layers[id].bgColor = newcolor;

}



if(document.all){ 

  document.all[id].style.backgroundColor = newcolor;

}



if(!document.all && document.getElementById){ // browser="NN6+ or IE5+ if you're willing to dump the !document.all stuff";

  document.getElementById(id).style.backgroundColor = newcolor;

}



}



setInterval("positioning();", 1000);

function opendiv()
{
	
	if(document.getElementById("stf").style.display='none')
	{
			document.getElementById("stf").style.display="";
	}
	else
	{
		document.getElementById("stf").style.display='none';	
	}
}