﻿//<!-- ******************** goto_url script ************************** -->

function goto_url(url) 
	{//v1.0
		window.location.replace(url);
	}

//<!-- ******************** popup scripts ************************** -->

function FP_popUpMsg(msg) {//v1.0
 alert(msg);
}

function show_popup(msg)
{
var p=window.createPopup()
var pbody=p.document.body
pbody.style.backgroundColor="lime"
pbody.style.border="solid black 1px"
pbody.innerHTML=(msg)
p.show(150,150,200,50,document.body)
}


//<!-- ******************** open a window ************************** -->

function print_label()
{
Window=window.open("http://www.bertramdental.com/shipping/accept.php");
}

//<!-- ******************** close a window ************************** -->

function closeWin()
{
Window.close();
}

//<!-- ********* handle pressed function keys within programs ********* -->

function Keyhandler_Meta(Meta, evt, e)
{
	if (!evt.kill)
	{
		evt.kill = function()
		{
			if (e == undefined) evt.keyCode = false; //Kill IE6+7
			evt.stop();
			evt.returnValue = false;
		}
	}
	var url = document.URL;
	var o = parseUri (document.URL);
	switch (Meta)
	{
		case 33: // Pg Up
			evt.kill();
			switch(o.file)
			{
				case "put php file name here":
					window.location.replace("put link here");
					break;
			} 
            // add as many cases as you need
            // use this as the template to fill in all the rest below which are not empty
			
			document.forms[0].next.value = "prev";
			if (document.forms[0].PageNumber.value > 1) document.forms[0].PageNumber.value--;
			document.forms[0].submit();
			break;
		case 34: // Pg Down
		case 114: //F3
			evt.kill();
			switch(o.file)
			{
				case "menu.php":
					window.location.replace("menu.php?type=mst");
					break;
			}
			break;
		case 117: //F6
		case 120: //F9
		case 123: //F12
		case 116: //F5
		case 115: //F4
		case 113: //F2
		case 118: //F7
		case 119: //F8
		case 121: //F10
		case 122: //F11
		case 112: //F1 (note: F1 can't be disabled in IE7... Motherfuckers)
			// evt.kill();
		default:
			Keyhandler_Combo(Meta, evt)
			break;
	}
	return false;
}


