// JavaScript Document

/*
	Standards Compliant Rollover Script
	Author : Daniel Nolan
	http://www.bleedingego.co.uk/webdev.php
*/

function initRollovers() {
	if (!document.getElementById) return
	
	var aPreLoad = new Array();
	var sTempSrc;
	var aImages = document.getElementsByTagName('img');

	for (var i = 0; i < aImages.length; i++) {		
		if (aImages[i].className == 'imgover') {
			var src = aImages[i].getAttribute('src');
			var ftype = src.substring(src.lastIndexOf('.'), src.length);
			var hsrc = src.replace(ftype, '_o'+ftype);

			aImages[i].setAttribute('hsrc', hsrc);
			
			aPreLoad[i] = new Image();
			aPreLoad[i].src = hsrc;
			
			aImages[i].onmouseover = function() {
				sTempSrc = this.getAttribute('src');
				this.setAttribute('src', this.getAttribute('hsrc'));
			}	
			
			aImages[i].onmouseout = function() {
				if (!sTempSrc) sTempSrc = this.getAttribute('src').replace('_o'+ftype, ftype);
				this.setAttribute('src', sTempSrc);
			}
		}
	}
}

window.onload = initRollovers;



/*----------------------------------------------------------------------------------*/


function flash_top(){
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="561" height="508">');
	document.write('<param name="movie" value="swf/top_safe.swf" />');
	document.write('<param name="quality" value="high" />');
	document.write('<embed src="swf/top_safe.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="561" height="508">');
	document.write('</embed>');
	document.write('</object>');
}

/*----------------------------------------------------------------------------------*/


function scr(top){
        scr_up(top,30);
}
    
function scr_up(top,y){
    y = y + (top - y)*.1;
    window.scroll(0,y);
    if (((top - y) <= .5)&&((top - y) >= -.5))
    {                   
        y = top;
    }else{
        setTimeout("scr_up("+top+","+y+")",1);
    }
}

function scr_e(top){
    y = 1;
    page_up = top*.5;
    while(y <= page_up)
    {
        window.scroll(0,y);
        y = y + (y*.05);

    }
    while(y != top)
    {
        window.scroll(0,y);
        y = y + (top-y)*.05;

        if (((top - y) <= .5)&&((top - y) >= -.5))
        {                   
            y = top;
        }       
    }
}

/*----------------------------------------------------------------------------------*/
function opw(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

/*----------------------------------------------------------------------------------*/
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}