// Start of configuration parameter 

	 // Interval to change the value for timer in milli seconds
	 var interval = 3000;
	 // Message height 
	 var flashMessageHeight = "50" ;
	 // List of messages to display 
	 var messages = new Array("VAR & Reseller - B2B/SMB","Free Trial Register (USA)") ;
	 // class name for each messages
	 var classNames = new Array("#ffccff","#00ff00") ;
	 // hyper link for each messages
	 var urls = new Array("http://www.bscaler.com/home/registration.htm",
						  "http://www.bscaler.com/home/registration.htm") ;

// end of configuration parameter 

// global varaible declaration 
 var linkClassName = "link" ; 
 var messageCounter = 0 ;

 function createLink (id,url,text,newWindow) {	
			var td = document.getElementById(id);
			var isLink = true ;
			if (isLink && document.getElementById(id)) {
					td.height = "30px" ; 
					td.className = "tddefault leftlink" ;
					td.onmouseover = function (temp) { changeCursor(this); } ;
					td.onmouseout = function (temp) { resetCursor(this); } ;
					td.onclick = function (temp) { showLink(this,url,newWindow); } ;
					td.innerHTML = text ;
				}
	}

  function changeCursor(currentTd) {
		var className = currentTd.className ;
		className = className.replace("reset_cursor","");
		className = className.replace("change_cursor","");
		currentTd.className = className + " change_cursor" ;
	}

  function resetCursor(currentTd) {	
		var className = currentTd.className ;
		className = className.replace("change_cursor","reset_cursor");
		currentTd.className = className ;
	}

  function showLink(currentTd,url,newWindow) {
			if (typeof(newWindow) != 'undefined' && newWindow) {
					   window.open(url) ;
			} else {
						window.location.href=url;
			}
   }           
    
   function createFlashMessage(id) {
		var tdId = document.getElementById(id); 
		if (document.getElementById(id)){
			tdId.height = flashMessageHeight ;
			tdId.innerHTML = messages[messageCounter] ;
			//tdId.className = classNames[messageCounter];
			tdId.style.backgroundColor = classNames[messageCounter];
						
			//alert(messages.length);
			tdId.onmouseover = function (temp) { changeCursor(this); } ;
			tdId.onmouseout = function (temp) { resetCursor(this); } ;
			//var index = eval("messageCounter+0");
			var url = urls[messageCounter] + "";
			tdId.onclick = function (temp) { showLink(this,url,true); } ;
			setTimeout(function (temp) {createFlashMessage(id);},interval);
			messageCounter = messageCounter + 1 ;
			if (messageCounter >= messages.length) {
				messageCounter = 0 ;
			}				
		}
   }


createFlashMessage("event");

createLink("bscaler","http://www.bscaler.com","BScaler");
createLink("contact-us","http://www.bscaler.com/home/about-us/contact-us.htm","Contact Us--");
createLink("demo","http://www.bscaler.com/cloud-computing-erp/customer-benefits.htm","Customer Benefits");
createLink("free-trial","http://www.bscaler.com/home/registration.htm","Free Trial Register (USA)");
createLink("cloud-computing","http://www.bscaler.com/erp/cloud-computing.htm","Cloud Computing SaaS");
createLink("ecommerce","http://www.bscaler.com/cloud-computing-erp/ecommerce.htm","Integrated eCommerce");
createLink("saas-benefits","http://www.bscaler.com/home/why-bscaler/saas.htm","SaaS Benefits");
createLink("saas-security","http://www.bscaler.com/home/why-bscaler/security.htm","SaaS & Security");
createLink("product-info","http://www.bscaler.com/home/erm/product-info.htm","Product Information");
createLink("news-articles","http://www.bscaler.com/news/news-events.htm","News & Articles");
createLink("customers","http://www.bscaler.com/erm/customers.htm","Customers Say");
createLink("white-paper","http://www.bscaler.com/home/why-bscaler/white-papers.htm","White Paper Series");
createLink("front-office","http://www.bscaler.com/erp/web-based-erp-demo.htm","Web-based Accounting ERP");
createLink("back-office","http://www.bscaler.com/cloud-computing-erp/back-office.htm","Accounting Software");
createLink("unified-database","http://www.bscaler.com/erm/index_erm.htm","Unified Database ERP");
createLink("admin","http://www.bscaler.com/cloud-computing-erp/admin.htm","Administration Module");
createLink("smb","http://www.bscaler.com/home/industries/smb.htm","Small-Medium Businesses");
createLink("npo","http://www.bscaler.com/home/industries/nfpo.htm","NPO / NFPO");
createLink("vars","http://www.bscaler.com/home/industries/var-reseller.htm","Vars & Resellers");
createLink("importers","http://www.bscaler.com/home/industries/import-distrib.htm","Importers & Distributors");
createLink("leasing","http://www.bscaler.com/home/industries/leasing-equip.htm","Leasing & Equip Rental");
createLink("management","http://www.bscaler.com/home/about-us/management.htm","Management Team");
createLink("employment","http://www.bscaler.com/home/about-us/employment.htm","Employment");
createLink("privatecy","http://www.bscaler.com/home/about-us/privacy-stmt.htm","Privatecy Statement");
createLink("demo--","http://www.bscaler.com/home/registration.htm","Schedule a Demo (USA)");
createLink("demo---","https://srm5.salesmatix.com:8889/bscaler/JSP/Leads/Registration.jsp","Schedule a Demo (USA)",true);
createLink("free-trial---","https://srm5.salesmatix.com:8889/bscaler/JSP/Leads/Leadinfo1-2.jsp","Free Trial Register (USA)",true);
createLink("front-office---","http://www.bscaler.com/cloud-computing-erp/front-office.htm","Front Office Modules");