// JavaScript Document
//functions.js

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		index_12_over = newImage("http://www.blagclub.com/images/index_12-over.gif");
		index_13_over = newImage("http://www.blagclub.com/images/index_13-over.gif");
		preloadFlag = true;
	}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function main_flash() {
  var w = 770;
  var h = 300;
  var l = (screen.width/2) - (w/2);
  var t = (screen.height/2) - (h/2);
  var f = "width="+w+",height="+h+",top="+t+",left="+l;
  window.open("http://www.blagclub.com/main_flash.html","blagmain",f);
}

function popup(url,name,w,h) {
  var l = (screen.width/2) - (w/2);
  var t = (screen.height/2) - (h/2);
  var f = "width="+w+",height="+h+",top="+t+",left="+l;
  window.open(url,name,f);
}

function showMembershipForm() {
  w = 772;
  h = 300;
  var l = (screen.width/2) - (w/2) + 10;
  var t = (screen.height/2) - (h/2) + 10;
  var f = "width="+w+",height="+h+",top="+t+",left="+l;
  window.open("membership_content.html","memform",f);
}

function display_image(src,name,w,h) {

  var l = (screen.width/2) - (w/2);
  var t = (screen.height/2) - (h/2);
  PreView = window.open("", "Preview", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width="+w+",height="+h+",top="+t+",left="+l);
  PreView.document.open();
  PreView.document.write("<HTML><HEAD>");
  PreView.document.write("<TITLE>| b l a g c l u b |</TITLE>");
  PreView.document.write("</HEAD><BODY BGCOLOR=FFFFFF TEXT=000000 leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>");
  PreView.document.write("<CENTER><FORM>");
  PreView.document.write("<IMG HSPACE=0 VSPACE=0 " + "SRC='" + src + "'>");
  //PreView.document.write("<INPUT TYPE='button' VALUE='Close' " + "onClick='window.close()'>");
  PreView.document.write("</FORM></CENTER>");
  PreView.document.write("</BODY></HTML>");
  PreView.document.close();
}
