//START UNIQUE VISITOR FUNCTION
function uniqueVisitor(action,siteID,visitorID,latitude,longitude){
var statVar = new statClass;
statVar.setHTTPMethod("POST");
var statReturn = statVar.uniqueVisitor(action,siteID,visitorID,latitude,longitude);

if(action == 'add'){
	return statReturn;
}else if(action == 'update'){
	if(statReturn == 'add'){ var statReturn = statVar.uniqueVisitor('add',siteID,'',latitude,longitude); } //IF the visitorID IS NOT in the db
	return statReturn;
}}
//END UNIQUE VISITOR FUNCTION





//START PAGE VIEW FUNCTION
function pageView(siteID,pageID,visitorID,referrer,keywords,viewTime,uniqueIdArg){
	var statVar = new statClass;
	statVar.setHTTPMethod("POST");
	statVar.pageView(siteID,pageID,visitorID,referrer,keywords,viewTime,uniqueIdArg);
}
//END PAGE VIEW FUNCTION





//START TOGGLE STAT DIVS
function toggleStatDivs(div,name){
document.getElementById('statPageTitle').innerHTML = name;
document.statForm.divID.value = div;
document.statForm.divName.value = name;
for(i=1;i<=4;i++){
	if(div == 'statDiv'+i){ document.getElementById(div).style.display = ''; }
	else{ document.getElementById('statDiv'+i).style.display = 'none'; }
}}
//END TOGGLE STAT DIVS
