var ext = "";
var isoky = false;
var clkps=1;

document.oncontextmenu = function(){ return false}
function openpage(url) {
var newwin = window.open (url,'','dependent=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=800,height=400,screenX=10,screenY=10,Left=10,Top=10');
}

function AddDash(obj) {
 var tmpV=obj.value;
 var tmpN=obj.name;
 if (tmpV.length == 3 && tmpV.charCodeAt(tmpV.length) != 45 && tmpV.charCodeAt(tmpV.length - 1) != 45)
 {
   obj.value = tmpV+"-";
 }
 if (tmpV.length == 7 && tmpV.charCodeAt(tmpV.length) != 45 && tmpV.charCodeAt(tmpV.length - 1) != 45)
 {
   obj.value = tmpV+"-";
 }
};

function menuselect (obj) {
	document.getElementById(pg+'tr').className='navmenu_over';
	}
function menucheck_over(obj) {
	if (obj.id != pg+'tr')
	{
		obj.className='navmenu_over'
	}
	}
function menucheck_over2(obj) {
	if (obj.id != pg+'tr')
	{
		obj.className='navmenu_over2'
	}
	}

function menucheck_out(obj) {
	if (obj.id != pg+'tr')
	{
		obj.className='navmenu'
	}
	}
function upperCaseFirst(obj) {
 var tmpV=obj.value;
 var tmpN=obj.name;
 if (tmpV.length == 1)
 {
   tmpV=tmpV.toUpperCase();
   obj.value = tmpV;
 }
};

function runclock () {
	clock_id = document.getElementById('clock');
	clock_child = clock_id.firstChild;
    		if (clock_child) { 
			clock_id.removeChild(clock_child);
		}
	if (clkps==1) {
		clock_value = document.createTextNode("|");
	}
	if (clkps==2) {
		clock_value = document.createTextNode("/");
	}

	if (clkps==3) {
		clock_value = document.createTextNode("-");
	}

	if (clkps==4) {
		clock_value = document.createTextNode("\\");
	}

	if (clkps==5) {
		clock_value = document.createTextNode("|");
	}
	if (clkps==6) {
		clock_value = document.createTextNode("/");
	}
	if (clkps==7) {
		clock_value = document.createTextNode("-");
	}
	if (clkps==8) {
		clock_value = document.createTextNode("\\");
		clkps=0;
	}
clkps++;
clock_id.appendChild(clock_value);
timerID=setTimeout("runclock();",1000);
}
function checkforvals (obj) {
        for (var i =0; i < obj.length; i++)    {
                        var tmpV = obj[i].value;
                        var tmpN = obj[i].className;
                if (tmpN == "req_phone")        {
                        for (var ii =0; ii < tmpV.length; ii++)    {
                                var c = tmpV.charCodeAt(ii);
                                //dashes && numbers only
                                if ( (c > 57 || c < 47) && c != 45)
                                {
                                        alert("Only numbers from 0-9 and dashes are allowed for \'\'"+ obj[i].id +"\'\' \nPlease Re-enter");
                                        obj[i].focus();
                                        return false;
                                }
                        }
                }
                if (tmpN == "req_radio") {
                        if (obj[i].checked != true && obj[i+1].checked != true) {
                                alert("Please answer the question \'\'"+ obj[i].id +"\'\'");
                                return false;
                        }
                                i++;
                }

                if (tmpV.length == 0 && (tmpV =="enter your email" || tmpN =="req" || tmpN =="req2" || tmpN =="req_radio" || tmpN =="req_phone")){
                        alert("The field \'\'"+ obj[i].id +"\'\' must be filled out.\nPlease Complete");
                        obj[i].focus();
                        return false;
                }
		else {
		if (tmpV == 'enter your email') 
		{
		alert ("Please enter your email address to be added to our newsletter"); 
		return false;
		}
		}
        }
return true;
}

function Openlic(url)  {
helpWin = window.open('/License-agreement.pdf','','dependent=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=600,height=550,screenX=10,screenY=10,Left=10,Top=10');
  helpWin.focus();
};

function flashslide () {
if (Get_Cookie('flashp')){
      flashi=Get_Cookie('flashp');
};
if (flashi >=flashmax) {flashi=0};
// alert (document.getElementById ('flash_img').class.style);
// alert (document.getElementById ('flash_img').className.background);
document.getElementById ('flash_img').style.backgroundImage="url('"+flashar[flashi]+"')";
flashi++;
Set_Cookie('flashp', flashi, '', '/', '', '' );
timerID=setTimeout("flashslide()",6000);
}

function showtest () {
if (testi >=testmax) {testi=0};
document.getElementById('testimonial').innerHTML=testimonar[testi];
testi++;
if (testi <testmax) {
document.getElementById('testimonial').innerHTML=document.getElementById('testimonial').innerHTML+"<br><br><br>"+testimonar[testi];
testi++;
};
if (testi <testmax) {
document.getElementById('testimonial').innerHTML=document.getElementById('testimonial').innerHTML+"<br><br><br>"+testimonar[testi];
testi++;
};
timerID=setTimeout("showtest()",10000);
}

function startup () {
flashslide();
//showtest();
}


