﻿var IntScroll=-345;
var intNabisalertTimeOut;
var StoreDirection=-1;
var CurBox = 'business';
var intNabisalertTimeOutWork;
var intLastScrollLeft=0;

function fn_onload()
	{	
	}
	
function fn_AutoScroll()
	{
					
		fn_scroll_projects(1);				
		
		if (intLastScrollLeft==document.getElementById('WebScroll').scrollLeft)
			{
			document.getElementById('WebScroll').scrollLeft=0;
			intLastScrollLeft=0;
			}
		else
			{
			intLastScrollLeft = document.getElementById('WebScroll').scrollLeft;
			}				
		intNabisalertTimeOutWork = window.setTimeout("fn_AutoScroll()", 5000);
	}	

function fn_show_contact()
	{
		StoreDirection = StoreDirection * -1;
		fn_Nabis_Scroll_In('box_contact',StoreDirection);
	}
		

function fn_Nabis_Scroll_In(StrObjName, IntDirection) {
   
    var ObjDiv = document.getElementById(StrObjName);
    
    //if (IntScroll== 0) {IntScroll = parseInt(ObjDiv.style.top); }
    
    IntScroll = IntScroll + (IntDirection * 10);
   //alert(IntDirection);
    ObjDiv.style.top = IntScroll + 'px';
        
    window.clearTimeout(intNabisalertTimeOut);
	if (IntDirection==1 && IntScroll<=-2) {	    
	    intNabisalertTimeOut = window.setTimeout("fn_Nabis_Scroll_In('" + StrObjName + "'," + IntDirection + ")", 25);		
		} 	
		
	if (IntDirection==-1 && IntScroll>=-344) {	    
	    intNabisalertTimeOut = window.setTimeout("fn_Nabis_Scroll_In('" + StrObjName + "'," + IntDirection + ")", 25);
		} 	
}

function fn_change(StrBox)
{
	document.getElementById('box_' + CurBox).style.display='none';
	document.getElementById('box_' + StrBox).style.display='';
	CurBox = StrBox;

}	

var intNabisScroller;
var IntTmpScrollerInt=0;

function fn_scroll_projects(IntDir)
{
//for (var i=0; i<500; i++)
//		{
		document.getElementById('WebScroll').scrollLeft = document.getElementById('WebScroll').scrollLeft + (IntDir * 10);
		IntTmpScrollerInt++;
		if (IntTmpScrollerInt<=49) {intNabisScroller = window.setTimeout("fn_scroll_projects(" + IntDir + ")", 5);}
			else {IntTmpScrollerInt=0;}

//		}
}

function fn_checkform()
{
	if (document.getElementById('eMail').value =='') {alert('Please Provide an Email Address!'); return false;}

	return true;
}

