// JavaScript Document

// MAXIMIZE PAGE

function maximizeWin() {
  if (window.screen) {
    var aw = screen.availWidth;
    var ah = screen.availHeight;
    window.moveTo(0, 0);
    window.resizeTo(aw, ah);
  }
}
// ALERT 640x480 

function checkRes() {
	if ((screen.width < 780) || (screen.height < 550))
		alert('Please note: This site is optimized for a Screen Resolution of 800x600 or larger. Please adjust your settings for optimal viewing.');
}


  
function infoscroll(seed,looped){var text1 = "Welcome to TROPIKA ISLAND";
var text2 = " South African's voted Tropika as one of the Top 3 brands   ";
var msg=text1+text2;var putout = " ";
        var c   = 1;
	if (looped > 10) {
		window.status="";
	}
	else if (seed > 100) 
{
                seed--;
                var cmd="infoscroll(" + seed + "," + looped + ")";
                timerTwo=window.setTimeout(cmd,100);
        }
        else if (seed <= 100 && seed > 0) {
                for (c=0 ; c < seed ; c++) {
                        putout+=" ";
                }
putout+=msg.substring(0,100-seed);	
                seed--;
                var cmd="infoscroll(" + seed + "," + looped + ")";
                    window.status=putout;
                timerTwo=window.setTimeout(cmd,100);
        }
        else if (seed <= 0) 
{
                if (-seed < msg.length) 
{
                        putout+=msg.substring(-seed,msg.length);
                        seed--;
                        var cmd="infoscroll(" + seed + "," + looped + ")";
                        window.status=putout;
                        timerTwo=window.setTimeout(cmd,100); // 100
                }
                else {
                        window.status=" ";
			looped += 1;
			var cmd = "infoscroll(100," + looped + ")";
                       timerTwo=window.setTimeout(cmd,75); // 75
                }
        }
}


infoscroll(100,1)


