// JavaScript Document
function learn(){
	if ((document.getElementById("d_name").value=="")||(document.getElementById("d_name").value=="Your Name")){
		//alert("Please type in your name!");
		jAlert('Please type in your name!', 'Learn More');
	}
	else{
		email = document.getElementById("d_email").value;
		if ((document.getElementById("d_email").value=="")||(document.getElementById("d_email").value=="Your Email Address")){
			//alert("Please type in your email address!");
			jAlert('Please type in your email address!', 'Learn More');
		}
		else if (email.indexOf("@",1)==-1){
			//alert("Please enter a valid email address.");
			jAlert('Please enter a valid email address.', 'Learn More');
		}
		else if (email.indexOf(".",3)==-1){
			jAlert('Please enter a valid email address.', 'Learn More');
		}
		else{
			website = document.getElementById("d_website").value;
			if (document.getElementById("d_website").value==""){
				//alert("Please type in your website URL!  ie http://www.liveactor.com");
				jAlert('Please type in your phone number!', 'Learn More');
			}
			else{
				document.getElementById("form1").action='moar.php';
				document.getElementById("form1").submit();
				//jAlert('Success!', 'Learn More');
				
			}	
		}
	}
	return;
}
function animate(){
	$("#web_fly").show("fast");
	$("#web_fly").animate({ left: 267 }, 'slow');
	$("#seo_fly").show("fast");
	$("#seo_fly").animate({ right: 44 }, 'slow');
	$("#call_bounce").show("slow");
	$("#media_logo").show("slow");
	return;
}
function add_effects(){
	$(".holder").children().children().css("display","none");
    $(function() {
       	$('.holder .lb').lightBox();
   	 });
	$(function() {
       	$('.holder .lb2').lightBox();
   	 });
	$(function() {
       	$('.holder .lb3').lightBox();
   	 });
	show();
	return;
}
function show(){
	$(".holder").children().children().show("slow");
	$(".holder").children().children().fadeTo("slow",.60);		
	$(".holder").children().children().hover(function(){$(this).fadeTo("slow",1);},function(){$(this).fadeTo("slow",.60);});
	return;
}
function just_seo(){
	$(function() {
       	$('.lb').lightBox();
   	 });
	return;	
}
function post_it(){
	$("#post1").animate({ left: 139 }, 'fast');
	$("#post3").animate({ left: 752 }, 'slow');
	$("#post2").animate({ bottom: 146 }, 'slow');
}
function shake(){
	setTimeout('shakeit()',8000);
}
function shakeit(){
	$("#call_bounce img").animate({ width: 128,height: 100}, 'fast');
	$("#call_bounce img").animate({ width: 328,height: 130}, 'fast');
	$("#call_bounce").animate({ top: 0,right: 220}, 'fast');
	$("#call_bounce img").animate({ width: 268,height: 115}, 'fast');
	$("#call_bounce").animate({ top: 21,right: 254}, 'fast');
	shake();
	return;
}
function MM_CheckFlashVersion(reqVerStr,msg){
  with(navigator){
    var isIE  = (appVersion.indexOf("MSIE") != -1 && userAgent.indexOf("Opera") == -1);
    var isWin = (appVersion.toLowerCase().indexOf("win") != -1);
    if (!isIE || !isWin){  
      var flashVer = -1;
      if (plugins && plugins.length > 0){
        var desc = plugins["Shockwave Flash"] ? plugins["Shockwave Flash"].description : "";
        desc = plugins["Shockwave Flash 2.0"] ? plugins["Shockwave Flash 2.0"].description : desc;
        if (desc == "") flashVer = -1;
        else{
          var descArr = desc.split(" ");
          var tempArrMajor = descArr[2].split(".");
          var verMajor = tempArrMajor[0];
          var tempArrMinor = (descArr[3] != "") ? descArr[3].split("r") : descArr[4].split("r");
          var verMinor = (tempArrMinor[1] > 0) ? tempArrMinor[1] : 0;
          flashVer =  parseFloat(verMajor + "." + verMinor);
        }
      }
      // WebTV has Flash Player 4 or lower -- too low for video
      else if (userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 4.0;

      var verArr = reqVerStr.split(",");
      var reqVer = parseFloat(verArr[0] + "." + verArr[2]);
  
      if (flashVer < reqVer){
        if (confirm(msg))
          window.location = "http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";
      }
    }
  } 
}