// JavaScript Document

/*
##########################
Master JavaScript Document
##########################
*/

function loginPage(){
//	window.location = "http://www.monthlygiftsclub.com/products/login.asp";
	window.location.href = "http://www.monthlygiftsclub.com/products/login.asp";
}

var loginWindow;
var popupWindow;

function popwindow(vfilename){
	if (!popupWindow || popupWindow.closed) {
		popupWindow=void window.open("http://www.kionix.com/"+vfilename,"pdfpop","toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=650,height=450");
	} else {
    	popupWindow.focus();
	}
}

function popwindowbig(vfilename){
	if (!popupWindow || popupWindow.closed) {
		popupWindow=void window.open("http://www.kionix.com/"+vfilename,"pdfpop","toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=725,height=525");
	} else {
    	popupWindow.focus();
	}
}

function popwindow_external(vfilename){
	if (!popupWindow || popupWindow.closed) {
		popupWindow=void window.open(vfilename,"pdfpop","toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=725,height=525");
	} else {
    	popupWindow.focus();
	}
}

function openLogin(){
//	if (!loginWindow || loginWindow.closed) {
		loginWindow = void window.open("http://www.monthlygiftsclub.com/products/login.asp", "loginWindow", "status=0, toolbar=0, location=0, menubar=0, directories=0, resizable=1, scrollbars=1, height=350, width=420");
//	} else {
 //   	loginWindow.focus();
//	}
}


function closeWndw(){
	//var theLoginWindow = self;
	loginWindow.close();
	window.opener.location="http://www.monthlygiftsclub.com/products/securepage.html";
}

function checkEnter(e){ //e is event object passed from function invocation
//	alert("got here!!");
	var characterCode;
	 if(e && e.which){ //if which property of event object is supported (NN4)
		 e = e;
		 characterCode = e.which //character code is contained in NN4's which property
	 }else{							
		 e = event;				
		 characterCode = e.keyCode //character code is contained in IE's keyCode property
	 }
	 if(characterCode == 13){ //if generated character code is equal to ascii 13 (if enter key)
		 document.form0.submit();
		 //document.forms[0].submit() //submit the form
		 return false; 
	 }else{
		 return true; 
	 }
}

