﻿// JScript File

function openWindow(strPageName, strWidth, strHeight) {
    newwindow = window.open(strPageName, 'Admin', 'scrollbars=yes,height=' + strHeight + ',width=' + strWidth + ',resizable=yes');
    if (window.focus) { newwindow.focus() }
    return false;
}

// Right clicking on images disabled
var clickmessage="Images on this website are the property of Phoenix Surveying Equipment";
function disableclick(e)
{
	if (document.all)
	{
		if (event.button==2||event.button==3)
		{
			if (event.srcElement.tagName=="IMG")
			{
				alert(clickmessage);
				return false;
			}
		}
	}
	else if (document.layers)
	{
		if (e.which == 3)
		{
			alert(clickmessage);
			return false;
		}
	}
	else if (document.getElementById)
	{
		if (e.which==3&&e.target.tagName=="IMG")
		{
			alert(clickmessage)
			return false
		}
	}
}

function associateimages()
{
	for(i=0;i<document.images.length;i++)
	document.images[i].onmousedown=disableclick;
}

function showLoadingMessage(loadingmessage) {
	document.getElementById(loadingmessage).style.display = 'block';
}

if (document.all)
document.onmousedown=disableclick
else if (document.getElementById)
document.onmouseup=disableclick
else if (document.layers)
associateimages()