/*
*********************************************************************
Language:       Javascript 1.5
Web Site:       #SERVER#
File Path:      #ROOTPATH#
Copyright:      ©#YEARNUM# Axon Design and Marketing (www.axondm.com)
Created:        #LOCALTIME %F %H:%M:%S#
Created by:     #USERNAME#
Version $:		3.0
*********************************************************************
*******************************************************************
Javascript worksheet
*******************************************************************
*/
/* FORMS --------------------------------------------------------- */
// << Submit Form
function form_submit($FORM) {
	document.getElementById($FORM).submit();
}
// >> Submit Form


/* WINDOWS ------------------------------------------------------- */
// << Pop Window Generic - Centered
function pop_generic(NAME,URL,WD,HT,TOOL,LOCATION,MENU,SCROLL,STATUS,RESIZE){
	if(!NAME){NAME = "genWin"}
	if(!WD){WD = "800"}
	if(!HT){HT = "600"}
	if(!TOOL){TOOL = "yes"}
	if(!LOCATION){LOCATION = "yes"}
	if(!MENU){MENU = "yes"}
	if(!SCROLL){SCROLL = "yes"}
	if(!STATUS){STATUS = "yes"}
	if(!RESIZE){RESIZE = "yes"}
	var halfW = (WD/2)
 	var halfH = (HT/2)
   	var screenW = screen.availWidth
    var screenH = screen.availHeight
    
    var screenX = ((screenW / 2) - halfW) // is half the width of the window
    var screenY = ((screenH / 2) - halfH) // is half the height of the window
	
	var WINNAME = NAME+'_win'
	if(document.layers){ //Fixes Netscape 4 bug
    	var NAME = window.open(URL, WINNAME);
	}
	else{
		var NAME = window.open(URL, WINNAME, 'width='+WD+', height='+HT+', top='+screenY+', left='+screenX+', toolbar='+TOOL+', location='+LOCATION+', menubar='+MENU+', scrollbars='+SCROLL+', status='+STATUS+', resizable='+RESIZE);
    }
    NAME.focus();
}
// >> Pop Window Generic - Centered



var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])

if ((version >= 5.5)) 
{
   for(var i=0; i<document.images.length; i++)
   {
      var img = document.images[i]
      var imgName = img.src.toUpperCase()
      if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
      {
         var imgID = (img.id) ? "id='" + img.id + "' " : ""
         var imgClass = (img.className) ? "class='" + img.className + "' " : ""
         var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
         var imgStyle = "display:inline-block;" + img.style.cssText 
         if (img.align == "left") imgStyle = "float:left;" + imgStyle
         if (img.align == "right") imgStyle = "float:right;" + imgStyle
         if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
         var strNewHTML = "<span " + imgID + imgClass + imgTitle
         + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
         + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
         + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
         img.outerHTML = strNewHTML
         i = i-1
      }
   }
}

