<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function OpenWindow(arglocation) {
var iWidth = 450
var iHeight = 600
var iLeft = (screen.width - iWidth) / 2
var iTop = ((screen.height - iHeight) / 2) - 10
var strFeatures = 'status=no,scrollbars=no,resizable=no,width=' + iWidth.toString() + ',height=' + iHeight.toString() + ',top=' + iTop.toString() + ',left=' + iLeft.toString()
//var strFeatures = 'status=no,scrollbars=yes,resizable=yes'
var win = window.open(arglocation,'winContest',strFeatures)
return false;
}

function OpenWindow2(arglocation) {
var iWidth = 600
var iHeight = 600
var iLeft = (screen.width - iWidth) / 2
var iTop = ((screen.height - iHeight) / 2) - 10
var strFeatures = 'status=no,scrollbars=no,resizable=no,width=' + iWidth.toString() + ',height=' + iHeight.toString() + ',top=' + iTop.toString() + ',left=' + iLeft.toString()
//var strFeatures = 'status=no,scrollbars=yes,resizable=yes'
var win = window.open(arglocation,'winContest',strFeatures)
return false;
}

function OpenWindow3(arglocation) {
var iWidth = 800
var iHeight = 600
var iLeft = (screen.width - iWidth) / 2
var iTop = ((screen.height - iHeight) / 2) - 10
var strFeatures = 'status=no,scrollbars=no,resizable=no,width=' + iWidth.toString() + ',height=' + iHeight.toString() + ',top=' + iTop.toString() + ',left=' + iLeft.toString()
//var strFeatures = 'status=no,scrollbars=yes,resizable=yes'
var win = window.open(arglocation,'winContest',strFeatures)
return false;
}

function window_onLoad()
{
	MM_preloadImages('/Design/Sub_Login-What.gif','/Design/Sub_Featured-What.gif','/Design/Sub_WinGelGems-What.gif','/Design/Sub_ContactUs-What.gif','/Design/SB_WhatAreGelGems1.gif','/Design/SB_WhereToBuy1.gif','/Design/SB_Catalog1.gif','/Design/SB_WhatsNew1.gif','/Design/SB_PlayWithGelGems1.gif','/Design/SB_DesignGallery1.gif','/Design/SB_Downloads1.gif','/Design/SB_Home1.gif',
	'/Design/Sub_Login-Where.gif','/Design/Sub_Featured-Where.gif','/Design/Sub_WinGelGems-Where.gif','/Design/Sub_ContactUs-Where.gif',
	'/Design/Sub_Login-Catalog.gif','/Design/Sub_Featured-Catalog-.gif','/Design/Sub_WinGelGems-Catalog.gif','/Design/Sub_ContactUs-Catalog.gif',
	'/Design/Sub_Login-Play.gif','/Design/Sub_Featured-Play.gif','/Design/Sub_WinGelGems-Play.gif','/Design/Sub_ContactUs-Play.gif',
	'/Design/Sub_Login-Gallery.gif','/Design/Sub_Featured-Gallery-.gif','/Design/Sub_WinGelGems-Gallery.gif','/Design/Sub_ContactUs-Gallery.gif',
	'/Design/Sub_Login-Downloads.gif','/Design/Sub_Featured-Downloads.gif','/Design/Sub_WinGelGems-Downloads.gif','/Design/Sub_ContactUs-Downloads.gif',
	'/Design/Sub_Login-New.gif','/Design/Sub_Featured-New.gif','/Design/Sub_WinGelGems-New.gif','/Design/Sub_ContactUs-New.gif',
	'/Design/Sub_Login-MyGelGems.gif','/Design/Sub_Featured-MyGelGems.gif','/Design/Sub_WinGelGems-MyGelGems.gif','/Design/Sub_ContactUs-MyGelGems.gif'); 
}
function Email_Page(argLink){
var strURL = '/Includes/EmailPage.asp?URL=' + argLink
		var iWidth = 400                                             //change 300 to width of window you are opening
    	var iHeight = 400                                            //change 300 to height of window you are opening
    	var iLeft = (window.screen.availWidth - iWidth) / 2
    	var iTop =  (window.screen.availHeight - iHeight) /2      
    	var strFeatures = 'status=no,scrollbars=no,resizable=yes,width=' + iWidth.toString() + ',height=' + iHeight.toString() + ',top=' + iTop.toString() + ',left=' + iLeft.toString()
        var win = window.open(strURL,'winEmailPage',strFeatures)
       	return false;
}

// get browser version
var ns4 = (document.layers)? true:false;
var ns6 = (document.getElementById)? true:false;
var ie4 = (document.all)? true:false;
var ie5 = false;
var enterFunction = ""

if (ie4) {
	if ((navigator.userAgent.indexOf('MSIE 5') > 0) || (navigator.userAgent.indexOf('MSIE 6') > 0)) {
		ie5 = true;
	}
	if (ns6) {
		ns6 = false;
	}
}

//*******************************************************************************
//*function fnCaptureKeyStrokes()  - establishes a function to call on a keydown
//*		event.  Uses a global variable (enterFunction) 
//*	Parameters:  argFunction -> String: function to use as keydown event handler
//*	Returns:  None
//*******************************************************************************/
function fnCaptureKeyStrokes(argFunction){
	// Capture keydown event and submit form if the enter key is pressed
	if ( (ns4) || (ie4) || (ns6)) {
		document.onkeydown = keyDown
		enterFunction = argFunction
		if (ns4) document.captureEvents(Event.KEYDOWN)
	}
}

//*******************************************************************************
//*function keyDown(DnEvents)  - Event handler for KeyDown event.  If the return
//*		key was pressed call the function set up through the fnCaptureKeyStrokes
//*		function call. 
//*	Parameters:  DnEvents -> Integer: keycode of the selected key - only needed
//*			for netscape.
//*	Returns:  Boolean -> Always return false.
//*******************************************************************************/
function keyDown(DnEvents) { // handles keypress
	if (ie4) {
		if (window.event.keyCode == 13) { // enter key pressed
			//fnLogon();
			window.setTimeout(enterFunction, 1);
			return false;
		}
	}else{
		if (ns4){ 
			if (DnEvents.which == 13){
				window.setTimeout(enterFunction, 1);
				return false;				
			}
		}
	}
}

//-->
