ns4 = (document.layers)? true:false

ie4 = (document.all)? true:false



//FLASH WINDOW OPENER

function openFlashWindow(url) {

	var wndHeight = 390;

	var wndWidth = 625;

	var X = 0;

	var Y = 0;

	if (screen.availWidth) {

		X = (screen.availWidth / 2) - (wndWidth / 2);

		Y = (screen.availHeight / 2) - (wndHeight / 2);

	}

	if (navigator.platform.indexOf("Mac") != -1) {

		if (ie4) {

			var flashWindow = window.open(url,'MRMovie','width=625,height=390,scrollbars=no,left=' + X + ',screenX=' + X + ',top=' + Y + ',screenY=' + Y);

		} else {

			var flashWindow = window.open(url,'MRMovie','width=625,height=390,scrollbars=no,left=' + X + ',screenX=' + X + ',top=' + Y + ',screenY=' + Y);

		}

	} else {

		var flashWindow = window.open(url,'MRMovie','width=625,height=390,scrollbars=no,left=' + X + ',screenX=' + X + ',top=' + Y + ',screenY=' + Y);

	}

	window.close();

}



//OPEN MEMBERS SECTION WINDOW

function openMember() {

	var wndHeight = 600;

	var wndWidth = 800;

	var X = 0;

	var Y = 0;

	if (screen.availWidth) {

		X = (screen.availWidth / 2) - (wndWidth / 2);

		Y = (screen.availHeight / 2) - (wndHeight / 2);

	}

	if (navigator.appVersion.indexOf("Mac") != -1) {

		if (ie4) {			

			window.open('http://www.clubmoulinrouge.com/member/index.htm','member_window','width=780,height=540,scrollbars=yes,left=' + X + ',screenX=' + X + ',top=' + Y + ',screenY=' + Y)

		} else {

		window.open('http://www.clubmoulinrouge.com/member/index.htm','member_window','width=785,height=545,scrollbars=yes,left=' + X + ',screenX=' + X + ',top=' + Y + ',screenY=' + Y)

		}

	}

	else {

		window.open('http://www.clubmoulinrouge.com/member/index.htm','member_window','width=785,height=545,scrollbars=yes,left=' + X + ',screenX=' + X + ',top=' + Y + ',screenY=' + Y)

	}

}



//OPEN REGISTRATION

function openRegister() {

	var wndHeight = 600;

	var wndWidth = 800;

	var X = 0;

	var Y = 0;

	if (screen.availWidth) {

		X = (screen.availWidth / 2) - (wndWidth / 2);

		Y = (screen.availHeight / 2) - (wndHeight / 2);

	}

	if (navigator.appVersion.indexOf("Mac")) {

		if (ie4) {

			window.open('http://www.clubmoulinrouge.com/html/register.htm','regwindow','width=780,height=540,scrollbars=no,left=' + X + ',screenX=' + X + ',top=' + Y + ',screenY=' + Y);

		} else {

		window.open('http://www.clubmoulinrouge.com/html/register.htm','regwindow','width=785,height=545,scrollbars=no,left=' + X + ',screenX=' + X + ',top=' + Y + ',screenY=' + Y);

		}

	}

	else {

		window.open('http://www.clubmoulinrouge.com/html/register.htm','regwindow','width=785,height=545,scrollbars=no,left=' + X + ',screenX=' + X + ',top=' + Y + ',screenY=' + Y);

	}

	window.close();

}



//ABOUT THIS SITE OPENER

function openAboutSite () {

	var wndHeight = 450;

	var wndWidth = 550;

	var X = 0;

	var Y = 0;

	if (screen.availWidth) {

		X = (screen.availWidth / 2) - (wndWidth / 2);

		Y = (screen.availHeight / 2) - (wndHeight / 2);

	}

  if (navigator.platform.indexOf("Mac") != -1){

		if (ie4) {

			var aboutWindow = window.open('http://www.clubmoulinrouge.com/shared/popups/about_site.htm','about','width=550,height=450,scrollbars=yes,left=' + X + ',screenX=' + X + ',top=' + Y + ',screenY=' + Y);

		} else {

			var aboutWindow = window.open('http://www.clubmoulinrouge.com/shared/popups/about_site.htm','about','width=565,height=460,scrollbars=yes,left=' + X + ',screenX=' + X + ',top=' + Y + ',screenY=' + Y);

		}

	} else {

		var aboutWindow = window.open('http://www.clubmoulinrouge.com/shared/popups/about_site.htm','about','width=565,height=460,scrollbars=yes,left=' + X + ',screenX=' + X + ',top=' + Y + ',screenY=' + Y);

	}

}



//OPEN POP-UP

function openPopup(url) {

	var wndHeight = 290;

	var wndWidth = 390;

	var X = 0;

	var Y = 0;

	if (screen.availWidth) {

		X = (screen.availWidth / 2) - (wndWidth / 2);

		Y = (screen.availHeight / 2) - (wndHeight / 2);

	}

	if (navigator.appVersion.indexOf("Mac")) {

		if (ie4) {

			window.open(url,'onwithshow_window','width=392,height=293,scrollbars=no,left=' + X + ',screenX=' + X + ',top=' + Y + ',screenY=' + Y)

		} else {

		window.open(url,'onwithshow_window','width=392,height=290,scrollbars=no,left=' + X + ',screenX=' + X + ',top=' + Y + ',screenY=' + Y)

		}

	}

	else {

		window.open(url,'onwithshow_window','width=392,height=290,scrollbars=no,left=' + X + ',screenX=' + X + ',top=' + Y + ',screenY=' + Y)

	}

}



//OPEN 'PRIVACY POLICY' WINDOW

function openPrivacy () {

	window.open('http://membercenter.foxmovies.com/privacy/fm')

}



//SIGN-IN

function signIn() {

	var wndHeight = 215;

	var wndWidth = 560;

	var X = 0;

	var Y = 0;

	if (screen.availWidth) {

		X = (screen.availWidth / 2) - (wndWidth / 2);

		Y = (screen.availHeight / 2) - (wndHeight / 2);

	}

	window.open('http://www.clubmoulinrouge.com/signin.htm','signin_window','width=560,height=235,scrollbars=no,left=' + X + ',screenX=' + X + ',top=' + Y + ',screenY=' + Y);

}

function OpenNewWindow(window_name)
    {
      var tmp;
      var newwindow;
      
      tmp = 'http://www.clubmoulinrouge.com/' + window_name;
      var options='width=800,height=600,resizable=yes,scrollbars=yes,status=no,';
      options += 'menubar=no,toolbar=no';
      newwindow = window.open(tmp,'Club',options);
      newwindow.focus ();
    }


//CLUB

function club() {

	var wndHeight = 545;

	var wndWidth = 287;

	var X = 0;

	var Y = 0;

	if (screen.availWidth) {

		X = (screen.availWidth / 2) - (wndWidth / 2);

		Y = (screen.availHeight / 2) - (wndHeight / 2);

	}

	window.open('club.htm','club_window','width=287,height=545,left=' + X + ',screenX=' + X + ',top=' + Y + ',screenY=' + Y);

}







//SCROLL STUFF

// Animation parameters

startX = 0

startY = 120

deltaX = -1

deltaY = 0

movePeriod = 25

// Animation code

function movement() {

 if(window.innerWidth) {

  w = window.innerWidth

  h = window.innerHeight

 }else{

  w = document.body.clientWidth

  h = document.body.clientHeight

 }

 currentX += deltaX

 if(currentX <= -2560 || currentX >= 0) {

  deltaX = 0 - deltaX

  currentX += deltaX

  currentY += deltaY

 }

 if(currentY >= h) currentY = startY

}

function setPosition(x,y) {

 divStyle.left = currentX

 divStyle.top = currentY

}

function moveDiv() {

 movement()

 setPosition()

}

function moveImage() {

 if(navigator.appName == "Netscape") 

  divStyle = document.scrollDiv

 else // Internet Explorer

  divStyle = document.all.scrollDiv.style

 currentX = startX

 currentY = startY

 setPosition(currentX, currentY)

 divStyle.visibility = "visible"

 setInterval("moveDiv()",movePeriod)

}





