﻿

		var isNS = (navigator.appName == "Netscape") ? 1 : 0;
		var EnableRightClick = 0;
		if(isNS) 
		document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP);

		function mischandler(){
		if(EnableRightClick==1){ return true; }
		else {return false; }
		}

		function mousehandler(e){
		if(EnableRightClick==1){ return true; }
		var myevent = (isNS) ? e : event;
		var eventbutton = (isNS) ? myevent.which : myevent.button;
		if((eventbutton==2)||(eventbutton==3)) return false;
		}

		function keyhandler(e) {
		var myevent = (isNS) ? e : window.event;
		if (myevent.keyCode==96)
			EnableRightClick = 1;
		return;
		}

		document.oncontextmenu = mischandler;
		document.onkeypress = keyhandler;
		document.onmousedown = mousehandler;
		document.onmouseup = mousehandler; 
		previousObjClicked = "";
		previousObjClickedOnMouseOut = "";
	
function CenterPopUp(Url,WindowWidth,WindowHeight)
        {
	        var WindowTop = 5//(screen.availHeight/2) - (WindowHeight/2);
	        var WindowLeft = (screen.availWidth/2) - (WindowWidth/2);
	        var WindowProps = 'toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=0,width='+WindowWidth+',height='+WindowHeight+',left='+WindowLeft+',top='+WindowTop+',screenx='+WindowLeft+',screeny='+WindowTop;
	        PopUpWindow = window.open(Url,"",WindowProps);
	        
        }
function CenterFullPopUp(Url)
        {
	         var WindowLeft = (screen.availWidth/2) - (400);
	         var params  = 'width='+screen.width-10;
             params += ', height='+screen.height-10;
             params += ', top=0, left='+ WindowLeft +', toolbar=1,location=0,status=1,menubar=0,scrollbars=1,resizable=1';

             var newwin=window.open(Url,'windowname4', params);
        }
function PopUpPlayTech(Url,WindowWidth,WindowHeight)
        {
	        var WindowLeft = (screen.availWidth/2) - (WindowWidth/2);
	        var WindowProps = 'toolbar=1,location=0,status=1,menubar=1,scrollbars=1,left='+ WindowLeft +',resizable=1';
	        PopUpWindow = window.open(Url,"",WindowProps);

        }
 function PopUpAffiliateLounge(Url,WindowWidth,WindowHeight)
        {
	        var WindowTop = 5//(screen.availHeight/2) - (WindowHeight/2);
	        var WindowLeft = (screen.availWidth/2) - (WindowWidth/2);
	        var WindowProps = 'toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=0,width='+WindowWidth+',height='+WindowHeight+',left='+WindowLeft+',top='+WindowTop+',screenx='+WindowLeft+',screeny='+WindowTop;
	        PopUpWindow = window.open(Url,"",WindowProps);

	        //var WindowProps = 'toolbar=0,location=0,status=0,menubar=0,scrollbars=1,left=0,resizable=1';
	        //PopUpWindow = window.open(Url,"",WindowProps);


        }
   function PopUpRushmorecasino(Url)
        {
	        var WindowProps = '';//'toolbar=0,location=0,status=0,menubar=0,scrollbars=1,left=0,resizable=1';
	        PopUpWindow = window.open(Url,"",WindowProps);


        }
        
   function PopUpCasinoCoins(Url)
        {
	        var WindowProps = '';//'toolbar=0,location=0,status=0,menubar=0,scrollbars=1,left=0,resizable=1';
	        PopUpWindow = window.open(Url,"",WindowProps);

        }
    
    function PopUpSpinpalace(Url)
        {
	        var WindowProps = '';//'toolbar=0,location=0,status=0,menubar=0,scrollbars=1,left=0,resizable=1';
	        PopUpWindow = window.open(Url,"",WindowProps);

        }
  
      
function onKeyDown() 
{ 
    var pressedKey = String.fromCharCode(event.keyCode).toLowerCase();   
    if (event.ctrlKey && (pressedKey == "c" || pressedKey == "v")) 
    {    
     event.returnValue = false;  
    } 
} 

function ShowOrHide(img) {
    if(sp_introduction != null) 
    {
            if(sp_introduction.style.display == "block" || sp_introduction.style.display =="" ) 
            {
               sp_introduction.style.display= 'none';
               img.src="images/plus.gif";
            }
            else 
            {
               sp_introduction.style.display='block';
               img.src="images/minus.gif";
            }
     }
  }

function CenterPopUpNoScrollBars(bigurl, WindowWidth, WindowHeight)
{
    var WindowTop = (screen.availHeight/2) - (WindowHeight/2);
	var WindowLeft = (screen.availWidth/2) - (WindowWidth/2);
	var WindowProps = 'toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0,width='+WindowWidth+',height='+WindowHeight+',left='+WindowLeft+',top='+WindowTop+',screenx='+WindowLeft+',screeny='+WindowTop;

	var newWindow = window.open("", "",WindowProps);
	
    newWindow.document.writeln("<html>");
    newWindow.document.writeln("<body style='margin: 0 0 0 0;'>");
    newWindow.document.writeln("<a href='javascript:window.close();'>");
    newWindow.document.writeln("<img src='" + bigurl + "' alt='Click to close' id='bigImage' border='0' />");
    newWindow.document.writeln("</a>");
    newWindow.document.writeln("</body></html>");
    newWindow.document.close();
}
function favorites(url,title)
{
    var msg = "Please press CTRL + D to bookmark us";
    
    if (window.sidebar)                             // firefox
	    window.sidebar.addPanel(title, url, "");
    else if(window.opera && window.print)           // opera
    {
        alert(msg);
    } 
    else if(document.all)                           // ie
	    window.external.AddFavorite(url, title);
	else 
	{
        alert(msg);
    }
}


var DragHandler = {


	// private property.
	_oElem : null,


	// public method. Attach drag handler to an element.
	attach : function(oElem) {
		oElem.onmousedown = DragHandler._dragBegin;

		// callbacks
		oElem.dragBegin = new Function();
		oElem.drag = new Function();
		oElem.dragEnd = new Function();

		return oElem;
	},


	// private method. Begin drag process.
	_dragBegin : function(e) {
		var oElem = DragHandler._oElem = this;

		if (isNaN(parseInt(oElem.style.left))) { oElem.style.left = '0px'; }
		if (isNaN(parseInt(oElem.style.top))) { oElem.style.top = '0px'; }

		var x = parseInt(oElem.style.left);
		var y = parseInt(oElem.style.top);

		e = e ? e : window.event;
		oElem.mouseX = e.clientX;
		oElem.mouseY = e.clientY;

		oElem.dragBegin(oElem, x, y);

		document.onmousemove = DragHandler._drag;
		document.onmouseup = DragHandler._dragEnd;
		return false;
	},


	// private method. Drag (move) element.
	_drag : function(e) {
		var oElem = DragHandler._oElem;

		var x = parseInt(oElem.style.left);
		var y = parseInt(oElem.style.top);

		e = e ? e : window.event;
		oElem.style.left = x + (e.clientX - oElem.mouseX) + 'px';
		oElem.style.top = y + (e.clientY - oElem.mouseY) + 'px';

		oElem.mouseX = e.clientX;
		oElem.mouseY = e.clientY;

		oElem.drag(oElem, x, y);

		return false;
	},


	// private method. Stop drag process.
	_dragEnd : function() {
		var oElem = DragHandler._oElem;

		var x = parseInt(oElem.style.left);
		var y = parseInt(oElem.style.top);

		oElem.dragEnd(oElem, x, y);

		document.onmousemove = null;
		document.onmouseup = null;
		DragHandler._oElem = null;
	}

};

        var x = 20;
        var y = 0;
    
        function moveLayer(ctrl,xPos,yPos)
        {
            
            
            xPos = parseInt(xPos);
            yPos = parseInt(yPos);
            
            if (document.getElementById(ctrl) != null)
            {
                document.getElementById(ctrl).style.display = '';
                
                if (y<=yPos)
                {
                    y += 3;
                    document.getElementById(ctrl).style.top = y + "px";
                    
                    if (y>=yPos)
                    {// horizontal move
                              y=yPos; //keeps the y loop from incrementing
                              x++;
                              document.getElementById(ctrl).style.left = x;//move layer
                    }//// horizontal move
                    
                    if (x<=xPos)
                        window.setTimeout("moveLayer('"+ctrl+"',"+xPos+","+yPos+")",1);                
                }
            }
        }
        function hideLayer(ctrl)
        {
            if (document.getElementById(ctrl) != null)
                document.getElementById(ctrl).style.display = 'none';
                
            enableContent();
        }
        function disableContent()
        {
            if (document.getElementById('emptyLayer') != null)
            {
                //alert('disable');
                document.getElementById('emptyLayer').style.display = '';
            }
        }
        function enableContent()
        {
            if (document.getElementById('emptyLayer') != null)
            {
                document.getElementById('emptyLayer').style.display = 'none';
            }
        }