
function getWindowHeight(){var windowHeight=0;if(typeof(window.innerHeight)=='number'){windowHeight=window.innerHeight;}
else{if(document.documentElement&&document.documentElement.clientHeight){windowHeight=document.documentElement.clientHeight;}
else{if(document.body&&document.body.clientHeight){windowHeight=document.body.clientHeight;}}}
return windowHeight;}
function getWindowWidth(){var windowWidth=0;if(typeof(window.innerWidth)=='number'){windowWidth=window.innerWidth;}
else{if(document.documentElement&&document.documentElement.clientWidth){windowWidth=document.documentElement.clientWidth;}
else{if(document.body&&document.body.clientWidth){windowWidth=document.body.clientWidth;}}}
return windowWidth;}
$(document).ready(function(){windowWidth=getWindowWidth();windowHeight=getWindowHeight();});$(window).resize(function(){windowWidth=getWindowWidth();windowHeight=getWindowHeight();});function changebackground(){$("BODY").css({"background":"#ff0000 url(/Themes/Lavolta/Common/image-sample.jpg) repeat-x"});}
$(function(){$(".error").fadeOut(0);$("#submit_btn").click(function(){$(".error").fadeOut(0);var author=$("input#author").val();if(author==""){$("label#author_error").fadeIn(0);$("input#author").focus();return false;}
var email=$("input#email").val();if(email==""){$("label#email_error").fadeIn(0);$("input#email").focus();return false;}
var website=$("input#website").val();var whisper=$("input#whisper").val();whisper=0;var comment=$("textarea#comment").val();var article=$("input#article").serialize();$('#commentheading').html("<h2>Comment Submitted</h2>");$('#commenthtmldisabled').hide();$('#commentform').slideUp(1000);var string2=$("#comment_form input").serialize()+"&"+$("#comment_form textarea").serialize();$.ajax({type:"POST",url:"/postcomment.asp",data:string2,complete:function(xhr){var response=xhr.responseText;$('#commentcomplete').html("<p>"+response+" </p>");$('#commentcomplete').append("<p>Thank you</P>");$('#commentcomplete').fadeIn(300);}});return false;});$("#question_submit").click(function(){$(".error").fadeOut(0);var author=$("input#author").val();if(author==""){$("label#author_error").fadeIn(0);$("input#author").focus();return false;}
var email=$("input#email").val();if(email==""){$("label#email_error").fadeIn(0);$("input#email").focus();return false;}
var company=$("input#company").val();var question=$("textarea#question").val();$('#questionheading').html("<h2>Question Submitted</h2>");$('#questionhtmldisabled').hide();$('#questionform').slideUp(1000);var string2=$("#question_form input").serialize()+"&"+$("#question_form textarea").serialize();$('#questioncomplete').text(string2);$.ajax({type:"POST",url:"/postquestion.asp",data:string2,complete:function(xhr){var response=xhr.responseText;$('#questioncomplete').html("<p>Thank you</p>");$('#questioncomplete').append("<p>"+response+" </p>");$('#questioncomplete').fadeIn(300);}});return false;});});function closevideo(){$("#videoframe").html("");$("#videoframe").css({"width":0,"height":0})
$("#videoframe").fadeOut();$("#overlaybackground").fadeOut(500);$("#header").fadeIn(200);}
function showvideoonsite(vurl,vtype,vsize,embed){var iwidth;var iheight;var ileft;vtype="wmv";vsize="low";$("#header").fadeOut(10);$("#overlaybackground").css({"position":"absolute","left":0,"top":0,"background":'#000000',"width":'100%',"height":$(document).height()-300,"opacity":0.7,"z-index":10});if(vsize=="high"){iwidth=770;iheight=650;}else{iwidth=770;iheight=650;}
ileft=windowWidth/2-iwidth/2;itop=windowHeight/2-iheight/2+$(document).scrollTop();$("#videoframe").css({"left":ileft,"top":itop,"width":iwidth,"height":650,"background-color":'white',"z-index":20});$("#overlaybackground").fadeIn(500);if(embed=='iframe'){$("#videoframe").html('<div id=framecloser style="width:750px;"><a href="javascript:closevideo();">X</a></div><iframe name="iframevideo" id=iframevideo width='+iwidth+' height='+iheight+' src="'+vurl+'"  style="border:none;padding:0;margin:0;"></iframe> ');}else{$("#videoframe").html('<div id=framecloser style="width:750px;"><a href="javascript:closevideo();">X</a></div><iframe name="iframevideo" id=iframevideo width='+iwidth+' height='+iheight+' src="/showvideo.asp?vurl='+vurl+'&bw='+vsize+'&pl='+vtype+'"  style="border:none;padding:0;margin:0;"></iframe> ');}
$("#videoframe").fadeIn(200);}