function fullscreen()
{
	window.moveTo(0,0);
	window.resizeTo(screen.width,screen.height);
}
fullscreen();
/////////////////////////////////////////////////////////////////////////////////// Text box OnFocus style change
//	textbox('over',this);
///////////////////////////////////////////////////////////////////////////////////
function textbox(way,obj)
{
		(way == 'over')?eval(obj).className = "Login-Over":eval(obj).className = "Login-Out";
}



/////////////////////////////////////////////////////////////////////////////////// Scrolling status Bar text 
// Being of Scrolling text in the Status bar
/////////////////////////////////////////////////////////////////////////////////// 

var speed = 50 //decrease value to increase speed (must be positive) 
var pause = 2500 //increase value to increase pause
var timerID = null 
var bannerRunning = false
var ar = new Array()
ar[0] = "Progenomix, Inc."
ar[1] = ""
ar[2] = ""
ar[3] = ""
ar[4] = ""
var currentMessage = 0
var offset = 0
function stopBanner() {
	if (bannerRunning)
		clearTimeout(timerID)
		bannerRunning = false
		}
function startBanner() {
		stopBanner()
		showBanner()
}
function showBanner() { 
		var text = ar[currentMessage]
		if (offset < text.length) {
			if (text.charAt(offset) == " ")
			offset++ 
			var partialMessage = text.substring(0, offset + 1)
			window.status = partialMessage
			offset++ 
			timerID = setTimeout("showBanner()", speed)
			bannerRunning = true
				} else {
			offset = 0
			currentMessage++
				if (currentMessage == ar.length)
					currentMessage = 0
					timerID = setTimeout("showBanner()", pause)
					bannerRunning = true
					}
							}


//this is to start the Scrolling Status Bar
startBanner();
// -->




/////////////////////////////////////////////////////////////////////////////////// Text Mask
//	onKeyDown="javascript:return dFilter (event.keyCode, this, '##/##/####');"
///////////////////////////////////////////////////////////////////////////////////


var dFilterStep

function dFilterStrip (dFilterTemp, dFilterMask)
{
    dFilterMask = replace(dFilterMask,'#','');
    for (dFilterStep = 0; dFilterStep < dFilterMask.length++; dFilterStep++)
          {
              dFilterTemp = replace(dFilterTemp,dFilterMask.substring(dFilterStep,dFilterStep+1),'');
          }
          return dFilterTemp;
}

function dFilterMax (dFilterMask)
{
           dFilterTemp = dFilterMask;
    for (dFilterStep = 0; dFilterStep < (dFilterMask.length+1); dFilterStep++)
          {
                     if (dFilterMask.charAt(dFilterStep)!='#')
                    {
                  dFilterTemp = replace(dFilterTemp,dFilterMask.charAt(dFilterStep),'');
                    }
          }
          return dFilterTemp.length;
}

function dFilter (key, textbox, dFilterMask)
{
          dFilterNum = dFilterStrip(textbox.value, dFilterMask);
          
          if (key==9)
          {
              return true;
          }
          else if (key==8&&dFilterNum.length!=0)
          {
                      dFilterNum = dFilterNum.substring(0,dFilterNum.length-1);
          }
        else if ( ((key>47&&key<58)||(key>95&&key<106)) && dFilterNum.length<dFilterMax(dFilterMask) )
          {
        dFilterNum=dFilterNum+String.fromCharCode(key);
          }

          var dFilterFinal='';
    for (dFilterStep = 0; dFilterStep < dFilterMask.length; dFilterStep++)
          {
        if (dFilterMask.charAt(dFilterStep)=='#')
                    {
                           if (dFilterNum.length!=0)
                           {
                            dFilterFinal = dFilterFinal + dFilterNum.charAt(0);
                               dFilterNum = dFilterNum.substring(1,dFilterNum.length);
                           }
                        else
                        {
                            dFilterFinal = dFilterFinal + "";
                        }
                    }
                     else if (dFilterMask.charAt(dFilterStep)!='#')
                    {
                        dFilterFinal = dFilterFinal + dFilterMask.charAt(dFilterStep);                
                    }
//              dFilterTemp = replace(dFilterTemp,dFilterMask.substring(dFilterStep,dFilterStep+1),'');
          }

			//if (textbox.value.length == 2 && Number(textbox.value)<13 )textbox.value="";
			if (dFilterFinal.length == 1 && dFilterFinal == "/")dFilterFinal = "";
          textbox.value = dFilterFinal;
    return false;
}

function replace(fullString,text,by) {
// Replaces text with by in string
    var strLength = fullString.length, txtLength = text.length;
    if ((strLength == 0) || (txtLength == 0)) return fullString;

    var i = fullString.indexOf(text);
    if ((!i) && (text != fullString.substring(0,txtLength))) return fullString;
    if (i == -1) return fullString;

    var newstr = fullString.substring(0,i) + by;

    if (i+txtLength < strLength)
        newstr += replace(fullString.substring(i+txtLength,strLength),text,by);
		
    return newstr;
}


///////////////////////////////////////////////////////////////////////////////////  
//	POP-UP Image Window	
///////////////////////////////////////////////////////////////////////////////////
function newimagewin(image,w,h,title)
			{
				screenleft=(screen.width/2)-(w/2);
				screentop=(screen.height/2)-(h/2);
				
				if (window.win!=null)window.win.close();

						win=window.open("","winnd","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizeable=0,width="+w+",height="+h+",top="+screentop+",left="+screenleft);
						window.win.document.writeln("<TITLE>"+title+"</TITLE>");
						window.win.document.writeln("<body BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>");
						window.win.document.writeln("<DIV ID='Layer1' STYLE='position:absolute; left:0; top:0; width:100%; height:10; z-index:1'>");
  						window.win.document.writeln("<DIV ALIGN='RIGHT' CLASS='Text-Regular'><IMG style='cursor:hand' SRC='images/icon_closetext.gif' WIDTH='44' HEIGHT='20' onClick='window.close();'></DIV>");
						window.win.document.writeln("</DIV>");
						window.win.document.writeln("<IMG SRC="+image+">");
						window.win.document.writeln("</BODY>");
						
			}


