    function getCookie(name) {
	var cookie = " " + document.cookie;
	var search = " " + name + "=";
	var setStr = null;
	var offset = 0;
	var end = 0;
	if (cookie.length > 0) {
		offset = cookie.indexOf(search);
		if (offset != -1) {
			offset += search.length;
			end = cookie.indexOf(";", offset)
			if (end == -1) {
				end = cookie.length;
			}
			setStr = unescape(cookie.substring(offset, end));
	   }
	}
	return(setStr);
    }

    function Set_Cookie( name, value, expires ) 
    {
        // set time, it's in milliseconds
        var today = new Date();
        today.setTime( today.getTime() );

        if ( expires )
        {
            expires = expires * 1000 * 60 * 60 * 24;
        }
        var expires_date = new Date( today.getTime() + (expires) );

        document.cookie = name + "=" +escape( value ) +
            ( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" );
    }

    function Delete_Cookie( name ) 
    {
	if( getCookie('we_flashHead')  )
           document.cookie = name + "=" +
           ";expires=Thu, 01-Jan-1970 00:00:01 GMT";
    }



    function changeHeader()
    {
        if(getCookie('we_flashHead') != 1)
        {
            Set_Cookie('we_flashHead', '1', 60000);
        }
        else
        {
	    Delete_Cookie('we_flashHead') 
        }
	if( window.location.toString().indexOf('\#') > -1 ) window.location.toString().replace('\#', '');
	window.location = window.location;
	return false;
    }
