var hasDemo = 0;
function redirectTo(url) {
window.location = url;
return false;
}
function redirectToNextWithEmailBlurb() {
	redirectTo("http://www.themfmethods.com/copy/landing2.html");
}
function zxcWWHS(){
  var myWidth = 0, myHeight = 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;
  }
var x,y;
if (self.pageYOffset) // all except Explorer
{
	x = self.pageXOffset;
	y = self.pageYOffset;
}
else if (document.documentElement && document.documentElement.scrollTop)
	// Explorer 6 Strict
{
	x = document.documentElement.scrollLeft;
	y = document.documentElement.scrollTop;
}
else if (document.body) // all other Explorers
{
	x = document.body.scrollLeft;
	y = document.body.scrollTop;
}
  return [myWidth,myHeight,y,x];
}
function findPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}
	return [curleft,curtop];
}
function showPrivacy(obj) {
var screenvar = zxcWWHS();
LeftPosition = (screenvar[0]) ? (screenvar[0]-520)/2 : 0;
TopPosition = (screenvar[1]) ? ((screenvar[1]-250)/2)+screenvar[2] : 0;
//var pos = findPos(obj);
document.getElementById("privacyBox").scrollTop = 0;
document.getElementById("privacyBox").style.left = LeftPosition+'px';
document.getElementById("privacyBox").style.top = TopPosition+'px';
document.getElementById("privacyBox").style.visibility = "visible";
document.getElementById("privacyBox").style.display = "inline";
return false;
}
function closePrivacy() {
document.getElementById("privacyBox").style.visibility = "hidden";
document.getElementById("privacyBox").style.display = "none";
}
function openNextOptin (obj) {
if (hasDemo!=1) {
var pos = findPos(obj);
document.getElementById("nextPopup").style.left = pos[0]-20+'px';
document.getElementById("nextPopup").style.top = pos[1]-350+'px';
document.getElementById("nextPopup").style.display = "block";
document.getElementById("nextPopup").style.visibility = "visible";
return false;
}
return redirectTo('http://www.themfmethods.com/copy/landing2.html');
}
function closeNextOptin() {
document.getElementById("nextPopup").style.visibility = "hidden";
document.getElementById("nextPopup").style.display = "none";
redirectTo('http://www.themfmethods.com/copy/landing2.html');
}
function updateHead(name) {
headObj.addVariable('punch',name+', check your inbox for your free demo!');
headObj.write('flashHeader');
return false;
}
function demoBlurb() {
var text = "<span class=\"hlyell\"><span class=\"style21\">THANKS!</span> Check your inbox in <strong>5 mins</strong></span><br />Your preview will be sent via email within the next 5 minutes... <strong>make sure you click the confirm link inside!</strong></span>";
document.getElementById("demoBlurb").innerHTML = text;
document.optForm1.FirstName.className = "txtdisabled";
document.optForm1.FirstName.disabled = true;
document.optForm1.Email.className = "txtdisabled";
document.optForm1.Email.disabled = true;
return false;
}
function toggleOnOff(obj,tog) {
if (tog == "on") {
document.getElementById(obj).style.display = "inline";
document.getElementById(obj).style.visibility = "visible";
} else {
document.getElementById(obj).style.display = "none";
document.getElementById(obj).style.visibility = "hidden";
}
return false;
}