
function show_hide(id){ 
	if (document.getElementById){ 
	obj = document.getElementById(id); 
	if (obj.style.display == "none"){ 
	obj.style.display = ""; 	
	
	} else { 
		obj.style.display = "none"; 		
	
	} 
	} 
} 

 function getCookie(name){
    if(document.cookie!=""){
      var cookie=document.cookie;
      var start=cookie.indexOf(name);
      var stop;

      if(start!=-1){
        start+=name.length+1;
        stop=cookie.indexOf(';', start);

        if(stop==-1)
          stop=cookie.length;
        return unescape(cookie.substring(start, stop));
      }
    }
    else
      return false;
  }

  function makeCookie(name, value){
    var cookie = name + '=' + escape(value) + ';';
    document.cookie = cookie;
  }

  function showhide(id, setcookie){
    if(setcookie==true){
      var cookie=getCookie('show');
      var show=new Array();
      if(cookie) {show=cookie.split(', ');}
      var invar=-1;

    for(i=0; i < show.length; i++)
      if(show[i]==id)
        invar=i;
    }

    if(document.getElementById(id).style.display=="none"){
      document.getElementById(id).style.display="block";

      if(invar==-1 && setcookie==true)
        show[show.length]=id;
    }
    else{
      document.getElementById(id).style.display="none";

      if(invar!=-1 && setcookie==true)
        show.splice(invar, 1);
    }

    if(setcookie==true)
      makeCookie('show', show.join(', '));
  }

  function init(){
    showhide('header', false)

    var cookievalue=getCookie('show');
    var show;

    if(cookievalue){
      show=cookievalue.split(', ');

      for(i=0; i < show.length; i++)
        document.getElementById(show[i]).style.display="block";
    }
  }


function change(imageName){
  if(document.images){ document['main'].src = eval(imageName + ".src"); }
}

function changeBack(){
  if(document.images){ document['main'].src = main.src; }
}
	

function Start(page) { 
	
	  x = (640 - 850)/2, y = (480 - 610)/2;
	
		if (screen) {
			y = (screen.availHeight - 610)/2;
			x = (screen.availWidth - 850)/2;
		}
		
	OpenWin = this.open(page, "CtrlWindow", "toolbar=no,top='+ y +',left='+ x +',screenY='+ y +',screenX='+ x +',menubar=no,location=no,scrollbars=no,resizable=no,width=850,height=610"); 
	} 


var popup = 0;

function open_window(page, width, height, window_name) {
    if(popup) {
        if(!popup.closed) {
            if (popup.focus) {popup.focus();}
        }
    }

    x = (640 - width)/2, y = (480 - height)/2;

    if (screen) {
        y = (screen.availHeight - height)/2;
        x = (screen.availWidth - width)/2;
    }

    popup = window.open(page, window_name, 'toolbar=no,top='+ y +',left='+ x +',screenY='+ y +',screenX='+ x +',directories=no,scrollbars=no,menubar=no,location=no,status=no,resizable=no,width=' + width + ',height=' + height);
   	popup.opener = window;
   return false;
}



 function SaveData() {
	// var vfrmForm = document.docForm;
	 

 
	//if ((vfrmForm.email.value == "") || (vfrmForm.email.value == "Join The Mailing List")) {
		//alert('Please enter an email address');
		//vfrmForm.email.focus();
		//return;
	//}
	
	//open_window('register.php', 500, 300, 'register');
	open_window('member.php', 500, 500, 'member');
	
	}