// JavaScript Document


//var cross_obj=document.all? document.all.staticbuttons : document.getElementById? document.getElementById("staticbuttons") : document.staticbuttons
//var cross_obj=document.getElementById("staticbuttons")
function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function positionit(){
	
var Hoffset=220 //Enter buttons' offset from right edge of window (adjust depending on images width)
var Voffset=142 //Enter buttons' offset from bottom edge of window (adjust depending on images height)
var thespeed=1 //Enter scroll speed in integer (Advised: 1-3)

var ieNOTopera=document.all&&navigator.userAgent.indexOf("Opera")==-1
var myspeed=0

var ieHoffset_extra=document.all? 15 : 0	
var cross_obj=document.getElementById("staticbuttons")
var dsocleft=document.all? iecompattest().scrollLeft : pageXOffset
var dsoctop=document.all? iecompattest().scrollTop : pageYOffset
var window_width=ieNOTopera? iecompattest().clientWidth+ieHoffset_extra : window.innerWidth+ieHoffset_extra;

var window_height=ieNOTopera? iecompattest().clientHeight : window.innerHeight;

if (document.all||document.getElementById)
{
cross_obj.style.left=parseInt(dsocleft)+parseInt(window_width)-Hoffset+"px";
cross_obj.style.top=dsoctop+parseInt(window_height)-Voffset+"px";
}
else if (document.layers){
cross_obj.left=dsocleft+window_width-Hoffset;
cross_obj.top=dsoctop+window_height-Voffset;
}
}

function initializeIT(){
positionit()

}

function fnFix(){
	setInterval("initializeIT()",20)
}	


function hide()
{

	makeRequest('hidescrap.asp')
	document.getElementById("staticbuttons").style.visibility='hidden'; 		

}

function makeRequest(url) {
        var httpRequest;
		url=url+"?sid="+Math.random()
        if (window.XMLHttpRequest) { // Mozilla, Safari, ...
            httpRequest = new XMLHttpRequest();
            if (httpRequest.overrideMimeType) {
                httpRequest.overrideMimeType('text/xml');
                // See note below about this line
            }
        } 
        else if (window.ActiveXObject) { // IE
            try {
                httpRequest = new ActiveXObject("Msxml2.XMLHTTP");
                } 
                catch (e) {
                           try {
                                httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
                               } 
                             catch (e) {}
                          }
                                       }

        if (!httpRequest) {
            alert('Giving up :( Cannot create an XMLHTTP instance');
            return false;
        }
        httpRequest.onreadystatechange = function() { alertContents(httpRequest); };
        httpRequest.open('GET', url, true);
        httpRequest.send(null);

    }

    function alertContents(httpRequest) {

        if (httpRequest.readyState == 4) {
            if (httpRequest.status == 200) {
                
            } else {
                alert('There was a problem with the request.');
            }
        }

    }


function GetXmlHttpObject2()
{ 


	var objXMLHttp=null;
//	var moz = (typeof document.implementation != 'undefined') && (typeof  document.implementation.createDocument != 'undefined'); 
//	var ie = (typeof window.ActiveXObject != 'undefined'); 
	
	if (window.XMLHttpRequest)
	{
	objXMLHttp=new XMLHttpRequest();
	}
	else if (window.ActiveXObject)
	{
	objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	return objXMLHttp;
} 





window.onload=fnFix;





