/*
function todaysDate()
{
if (is_ie3 || is_ie4up || is_nav3 || is_nav4up){
workdate = new Date();
var workdatestring = workdate.toString();
var datestring=workdatestring.substr(workdatestring.search(" ")+1);
var monthstring=datestring.substr(0,datestring.search(" "));
var datestring=datestring.substr(datestring.search(" ")+1);
var daystring=datestring.substr(0,datestring.search(" "));
if (daystring.search("0")==0){var daystring=daystring.substr(1);}
var yearstring=datestring.substr(datestring.length-4);
if (monthstring=="Jan"){var monthstring="January";}
if (monthstring=="Feb"){var monthstring="February";}
if (monthstring=="Mar"){var monthstring="March";}
if (monthstring=="Apr"){var monthstring="April";}
if (monthstring=="Jun"){var monthstring="June";}
if (monthstring=="Jul"){var monthstring="July";}
if (monthstring=="Aug"){var monthstring="August";}
if (monthstring=="Sep"){var monthstring="September";}
if (monthstring=="Oct"){var monthstring="October";}
if (monthstring=="Nov"){var monthstring="November";}
if (monthstring=="Dec"){var monthstring="December";}
return ("&nbsp;"+daystring+"&nbsp;"+monthstring+"&nbsp;"+yearstring+"&nbsp;");
}
else
{
return ("");
}
}
*/



function openEmailForm(location)
{
	window.open(location,"emailform","screenX=0,screenY=0,resizable=yes,height=450,width=650,scrollbars=yes");
}
function openPrintVersion(location)
{
	window.open(location,"printversion","screenX=0,screenY=0,resizable=yes,height=440,width=600,scrollbars=yes,menubar=yes,toolbar=yes");
}
function openTagPage(location)
{
	window.location = location;
}

function openCaptureDownload(url, downloadFile)
{
	
	var location= "/skm/CaptureDownload.aspx?url="+ url + "&df="+downloadFile;
	window.open(location, "downloadform", "screenX=0,screenY=0,resizable=yes,height=480,width=650,scrollbars=yes");
}


function closeForm()
{
self.close();
}
function submitForm(cFormName)
{
document.forms[cFormName].submit();
}
function openForm(command,title,nscreenX,nscreenY,nheight,nwidth,bscrollbars)
{
	if (nscreenX==null) {
		nscreenX = 0;
	}
	if (nscreenY==null) {
		nscreenY = 0;
	}
	if (nheight==null) {
		nheight = 450;
	}
	if (nwidth==null) {
		nwidth = 630;
	}
	if (bscrollbars==null) {
		bscrollbars = 1;
	}
	window.open("/forms/"+command,title,"screenX="+nscreenX+",screenY="+nscreenY+",resizable=yes,height="+nheight+",width="+nwidth+",scrollbars="+bscrollbars);
}


function openExternal(external)
{
	window.open(external,"External","screenX=0,screenY=0,resizable=yes,height=600,width=700,scrollbars=yes");
}

function openPreview(preview)
{
	window.open(preview,"Preview","screenX=0,screenY=0,resizable=yes,height=440,width=650,scrollbars=yes");
}

function openContact()
{
	window.open("/skm/contactus.aspx","contact","screenX=0,screenY=0,resizable=yes,height=450,width=730,scrollbars=yes,menubar=yes");
}


function goRegion() {
var selectindex = document.regiontable.Region.selectedIndex;
var selectvalue = document.regiontable.Region.options[selectindex].value;
window.location.href=selectvalue;
}
function setRegion() 
{
	document.region.selectedRegion.value = document.region.Regions.options[document.region.Regions.selectedIndex].value;
	document.region.submit();
}

function showhide(id) {
el = document.all ? document.all[id] : bw.dom ? document.getElementById(id) : document[id];
els = bw.dom ? el.style : el;

if (bw.dom){
	if (els.visibility == "hidden")
    	els.visibility = "visible";
	else els.visibility = "hidden";
}
else if (bw.ns4 || bw.ns5){
	if (els.visibility == "show")
    	els.visibility = "hide";
	else els.visibility = "show";
	}
}

function CheckAllDataGridCheckBoxes(aspCheckBoxID, checkVal) 

{	
    re = new RegExp(':' + aspCheckBoxID + '$')  //generated control	name starts with a colon
    for(i = 0; i < document.forms[0].elements.length; i++) 
    {
        elm = document.forms[0].elements[i]
        if (elm.type == 'checkbox') 
        {
            if (re.test(elm.name)) 
            {
                elm.checked = checkVal
            }
        }
    }
}



function checkBrowser(){
	this.ver=navigator.appVersion
	this.dom=document.getElementById?1:0
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0;
	this.ie7=(this.ver.indexOf("MSIE 7")>-1 && this.dom)?1:0;
	
	this.ie4=(document.all && !this.dom)?1:0;
	this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5 || this.ie6 || this.ie7)
	
	return this
}
var bw=new checkBrowser()




   HM_DOM = (document.getElementById) ? true : false;
   HM_NS4 = (document.layers) ? true : false;
    HM_IE = (document.all) ? true : false;
   HM_IE4 = HM_IE && !HM_DOM;
   HM_Mac = (navigator.appVersion.indexOf("Mac") != -1);
  HM_IE4M = HM_IE4 && HM_Mac;
HM_IsMenu = (HM_DOM || HM_NS4 || (HM_IE4 && !HM_IE4M));

HM_BrowserString = HM_NS4 ? "NS4" : HM_DOM ? "DOM" : "IE4";


function swapImage(cImageOver,cImageOut) {
	if (this.src == cImageOver) {
		this.src = cImageOut; }
	else {
		this.src = cImageOver; }
}

/*
function checkLogin()
{
	if (document.verify.emailaddress.value=="") {
		alert("You need to enter your email address before you can login.");
		document.verify.emailaddress.focus();
		return false;
	}
	if (document.verify.emailaddress.value.indexOf("@")== -1) {
		alert("You need to enter a valid email address before you can login.");
		document.verify.emailaddress.focus();
		return false;
	}
	if (document.verify.emailaddress.value.indexOf(".")== -1) {
		alert("You need to enter a valid email address before you can login.");
		document.verify.emailaddress.focus();
		return false;
	}
	if (document.verify.emailaddress.value.lastIndexOf(" ") != -1)
	{
		alert("Spaces are not permitted in email addresses,\nplease re-enter your email address.");
		document.verify.emailaddress.focus();
		return false;
	}
	if (document.verify.password.value=="") {
		alert("You need to enter your password before you can login.");
		document.verify.password.focus();
		return false;
	}
	if (document.verify.password.value.lastIndexOf(" ") != -1)
	{
		alert("Spaces are not permitted in passwords,\nplease re-enter your password.");
		document.verify.password.focus();
		return false;
	}
	document.verify.submit();
}

function sendPassword() 
{
	if (document.verify.emailaddress.value == "") {
		alert("Please enter the email address you use when\nyou access the Sinclair Knight Merz website");
		document.verify.emailaddress.focus();
		return false;
	}
	alert("Your email address will be verified and then your\npassword will be sent to you via that email address");
document.verify.Forgot.value = "forgot";
document.verify.submit();
return true;
}
*/


/*  if (document.layers)
    document.captureEvents(Event.KEYPRESS);
  document.onkeypress = function (evt) {
    var key = 
      document.all ? event.keyCode :
      evt.which ? evt.which : evt.keyCode;
    if (key == 13){}
      //document.searchform.submit();
  };*/  
// -->
