function preLoadImages(){
	if (document.images) {
		pic1 = new Image();
		pic1.src = "http://www.kidsyogakc.com/assets/images/images/site.logo.png";
		
		pic2 = new Image();
		pic2.src = "http://www.kidsyogakc.com/assets/images/site.navAboutOn.png";
		
		pic3 = new Image();
		pic3.src = "http://www.kidsyogakc.com/assets/images/site.navScheduleOn.png";
		
		pic4 = new Image();
		pic4.src = "http://www.kidsyogakc.com/assets/images/site.navPressOn.png";
		
		pic5 = new Image();
		pic5.src = "http://www.kidsyogakc.com/assets/images/site.navSoonOn.png";
		
		pic6 = new Image();
		pic6.src = "http://www.kidsyogakc.com/assets/images/site.navContactOn.png";
	}
}

function setAllCheckBoxes(FormName, FieldName, CheckValue)
{
	if(!document.forms[FormName])
		return;
	var objCheckBoxes = document.forms[FormName].elements[FieldName];
	if(!objCheckBoxes)
		return;
	var countCheckBoxes = objCheckBoxes.length;
	if(!countCheckBoxes)
		objCheckBoxes.checked = CheckValue;
	else
		// set the check value for all check boxes
		for(var i = 0; i < countCheckBoxes; i++)
			objCheckBoxes[i].checked = CheckValue;
}

function rollButton (image,newImage) {
	document.getElementById(image).src = newImage; 
}

function refreshParent(){
	opener.location.reload();
	self.close();
}

function cancel(){
	self.close();
}

function submitComment() {
	var result = valid.validate();
	if (result == true) {
		var params = Form.serialize($("commentForm"));
		var url = "http://www.sogreen.com/controller/blog/saveComment.cfm";
		var ajax = new Ajax.Updater({success: 'commentResponse'},url,{method: 'get', parameters: params, onFailure: reportError});
		document.getElementById("commentForm").style.display = 'none';
	}
}

function submitIssue() {
	var params = Form.serialize($("commentForm"));
	var url = "issuePostSend.cfm";
	var ajax = new Ajax.Updater({success: 'issueResponse'},url,{method: 'get', parameters: params, onFailure: reportError});			
}

function reportError(request) {
	$F('commentResponse').style.color = '#990000';
	$F('commentResponse').innerHTML = "Sorry! There was an error posting your comment. Please contact SoGreen for assistance";	
}
/*
function getSize() {
  var myWidth = 0, myHeight = 0, leftWidth = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  leftWidth = myWidth - 1100;
  leftWidth = leftWidth/2;
  //alert(leftWidth);
  document.getElementById("leftFake").style.width = leftWidth + "px";
}

*/