function flip(id1)
{

	if(document.getElementById(id1).style.visibility == "hidden")
	{
	  document.getElementById(id1).style.visibility = "visible";
	  document.getElementById(id1).style.display = "block"; 
  }
  else
  {
	  document.getElementById(id1).style.visibility = "hidden";
	 document.getElementById(id1).style.display = "none"; 
  }
}

function rflip(id1)
{
	if(document.getElementById("r"+id1).style.visibility == "hidden")
	{
	  document.getElementById("r"+id1).style.visibility = "visible";
	  document.getElementById("r"+id1).style.display = "block"; 
	   document.getElementById("plus"+id1).src = "/images/minus.png"; 
  }
  
    else
  {
	  document.getElementById("r"+id1).style.visibility = "hidden";
	 document.getElementById("r"+id1).style.display = "none"; 
	  document.getElementById("plus"+id1).src = "/images/plus.png"; 
  }
	
	
}


function flashFixer(ffile,fwidth,fheight)
{
	var flash = "<embed src=\""+ffile+"\" quality=\"high\" pluginspage=\"http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" menu=\"false\" width=\""+fwidth+"\" height=\""+fheight+"\"></embed>";
	document.write(flash);
}

function flashf2(ffile,fwidth,fheight)
{
	var flash = "<embed src=\""+ffile+"\" quality=\"high\" pluginspage=\"http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" menu=\"false\" width=\""+fwidth+"\" height=\""+fheight+"\"></embed>";
	return flash;
}

function podcast(file, pctitle)
{
	var flash = flashf2("/mp3Player.swf?where="+file+"&pctitle="+pctitle, 510, 35);

	document.write(flash);
}

function buttons()
{
	flashFixer("ppcButton.swf","170","107");
	document.write(" ");
	flashFixer("seoButton.swf","170","107");
	document.write(" ");
	flashFixer("webButton.swf","170","107");
	document.write(" ");
	flashFixer("affButton.swf","170","107");
	document.write(" ");
	flashFixer("emailButton.swf","170","107");
	document.write(" ");
	flashFixer("prButton.swf","170","107");
}

function formval()
{
	valid=true;
	
	if(document.enqform.name.value == "" || document.enqform.tel.value == "" || document.enqform.email.value == "" || document.enqform.tel.value == "" || document.enqform.url.value=="")
	{
		alert("Please fill in all required fields  (*).");
		valid=false;
	}
	
	return valid;
}


function formval1(thisform)
{
	valid=true;
	with (thisform)
	{
		if(name.value == "" || tel.value == "" || email.value == "" || tel.value == "" || url.value == "")
		{
			alert("Please fill in all required fields  (*).");
			valid=false;
		}
	}
	
	return valid;
}

function formval2(thisform)
{
	valid=true;
	with (thisform)
	{
		if(name.value == "" || email.value == "")
		{
			alert("Please fill in all required fields (*).");
			valid=false;
		}
	}
	
	return valid;
}



function ivemail(strEmail)
{
  validRegExp = /^[^@]+@[^@]+.[a-z]{2,}$/i;
  strEmail = document.forms[0].email.value;

   // search email text for regular exp matches
    if (strEmail.search(validRegExp) == -1) 
   {
      
      return true;
    } 
    
    return false;
}

function youtube_for_blog(url)
{
	/*var flash="<div style='position:relative;height:359px;'><div style='z-index:0;position:absolute;left:0;top:150px;width:100%;text-align:center'><img src=\"/images/loader.gif\" alt=\"Loading\"/></div><div style=\"margin: 0 auto;z-index:1;position:absolute;left:70px;top:0;\"><object width=\"425\" height=\"344\"><param name=\"movie\" value=\""+url+"\"></param><param name=\"allowFullScreen\" value=\"true\"></param><embed src=\""+url+"\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" allowfullscreen=\"true\" width=\"425\" height=\"344\">		</embed>	</object></div></div>";
	var flash="<div style='position:relative;height:316px;'><div style='z-index:0;position:absolute;left:0;top:150px;width:100%;text-align:center'><img src=\"/images/loader.gif\" alt=\"Loading\"/></div><div style=\"margin: 0 auto;z-index:1;position:absolute;left:90px;top:0;\"><object width=\"540\" height=\"316\"><param name=\"movie\" value=\""+url+"\"></param><param name=\"allowFullScreen\" value=\"true\"></param><embed src=\""+url+"\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" allowfullscreen=\"true\" width=\"520\" height=\"316\">		</embed>	</object></div></div>";
	
	document.write(flash); */
	document.write("<div class=\"Youtube_Container\"><div class=\"Youtube_Content\">");
	swfobject_insert(url, 425, 344, "<p>You need Flash Player installed to view this content.</p>");
	document.write("</div></div>");
}

function youtube_homepage(url)
{	
	swfobject_insert(url, 589, 384, "<p>You need Flash Player installed to view this content.</p>");
}

function swfobject_insert(url,width,height,alternative)
{
	var flash="<div style='position:relative;height:"+height+"px;'><object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+width+"\" height=\""+height+"\" wmode=\"opaque\"><param name=\"movie\" value=\""+url+"\" /><param name=\"wmode\" value=\"opaque\" /><!--[if !IE]>--><object type=\"application/x-shockwave-flash\" data=\""+url+"\" width=\""+width+"\" height=\""+height+"\" wmode=\"opaque\"><!--<![endif]-->"+alternative+"<!--[if !IE]>--></object><!--<![endif]--></object></div>";

	document.write(flash);	
}

function jsform()
{
	document.write("<input type=\"hidden\" name=\"spamqwbbbv\" value=\"sdajknj\">");
}

function blogVid(bvid, bpic, bwidth, bheight)
{
        var blog = "<object id=\"player\" classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" width=\""+bwidth+"\" height=\""+bheight+"\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0\"><param name=\"name\" value=\"player\" /><param name=\"allowfullscreen\" value=\"true\" /><param name=\"allowscriptaccess\" value=\"always\" /><param name=\"flashvars\" value=\"file="+bvid+"&amp;image="+bpic+"\" /><param name=\"src\" value=\"/videos/player-licensed.swf\" /><embed id=\"player\" type=\"application/x-shockwave-flash\" width=\""+bwidth+"\" height=\""+bheight+"\" src=\"/videos/player-licensed.swf\" flashvars=\"file="+bvid+"&amp;image="+bpic+"\" allowscriptaccess=\"always\" allowfullscreen=\"true\" name=\"player\"></embed></object>";
        document.write(blog);
}
