<!--
//check in date drop menus
var date = new Date();

var day = date.getDate();
var year = date.getFullYear();
var month = date.getMonth();

//BROWSER SNIFF
var isIE4 = (document.all && !document.getElementById) ? true : false;
var isIE5 = (document.all && document.getElementById) ? true : false;
var isNS6 = (!document.all && document.getElementById) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
var isDHTML = (isIE4 || isIE5 || isNS6);
var isPc = navigator.userAgent.indexOf("Windows") != -1;
var isMac = !isPc;



//FUNCTIONS
function swap(name,state) {
    if(document.images) {
        document[name].src = eval(name + state + ".src");
    }
}

function jumpSelect(selectlist) {
    var ind = selectlist.selectedIndex;
    var theURL = selectlist.options[selectlist.selectedIndex].value;
	if (theURL == "") return;
	document.location = theURL;
}

function getStyles() {
    if (isPc) {
    	return "<link rel=\"stylesheet\" type=\"text/css\" href=\"styles.css\">";
    } else {
    	return "<link rel=\"stylesheet\" type=\"text/css\" href=\"styles_mac.css\">";
    }
}

function getMonthMenu() {
	var selected = '';
	var months = ["January","February","March","April","May","June","July","August","September","October","November","December"];
	var nums = ["01","02","03","04","05","06","07","08","09","10","11","12"];
	for(i=0;i<months.length;i++) {
		if (i==month) {
			//alert(month);
			selected = " selected";
		} else {
			selected = "";
		}
		document.write('<option value=\"'+nums[i]+'\"'+selected+'>'+months[i]);
	}
}
function getDayMenu() {
	var selected = '';
	for(i=1;i<31;i++) {
		if (i==day) {
			//alert(day);
			selected = " selected";
		} else {
			selected = "";
		}
		document.write('<option value=\"'+i+'\"'+selected+'>'+i);
	}
}
function getYearMenu() {
	for(i=year;i<year+4;i++) {
		document.write('<option value=\"'+i+'\">'+i);
	}
}

function popup(location) {
	var dx=400;
	var dy=380;

	var w = window.open(location, 'popup_folk', 'width=' + dx + ',height=' + dy + ',status=no,resizable=yes,menubar=yes,location=no,scrollbars=yes,toolbar=no');
	w.focus();
}

//validation

function isPositiveNumber(num) {
	if(num == "" || num == 0) return false;
	if(Math.abs(num*1.0) != num) return false;
	return true;
}

function isNumber(num) {
	if(num == "") return false;
	if(num*1.0 != num) return false;
	return true;
}

function strip(s,what) {
	var i;
	while ((i = s.indexOf(what)) != -1) {
		s = s.substring(0,i) + s.substring(i+what.length,s.length);
	}
	return s;
}

//-->

