function goto(place){parent.window.location.href=place;return;}
function pullDown_Menu(){var url=document.pullDown.selectname.options[document.pullDown.selectname.selectedIndex].value;window.location.href=url;}
function showDiv(){var pathinfo=(location.pathname.indexOf('?')!=-1)?location.pathname.substring(0,location.pathname.indexOf('?')):location.pathname;var divshow=document.getElementById('searchbox');if(document.Search.keyword.value.length>3)
{if(divshow.style.display!="block")
{if(typeof(window.innerWidth)=='number'){width=window.innerWidth;var newright=eval(((width-1024)/2)+136)+'px';}else if(document.documentElement&&(document.documentElement.clientWidth)){width=document.documentElement.clientWidth;var newright=eval(((width-1024)/2)+136)+'px';}
if(width>1024){divshow.style.right=newright;}
divshow.style.display="block";}
var $j=jQuery.noConflict();$j.ajax({type:"POST",url:"/AJAXsearchboxresults.cfm",data:"test="+document.Search.keyword.value+"&pagename="+pathinfo,dataType:"html",success:function(msg){$j("#searchcontent").html(msg);}})}
else if(divshow.style.display=="block")
{closeDiv();}}
function showBasket(){}
function closeDiv(){var divshow=document.getElementById('searchbox');divshow.style.display="none";}
function showreview(){var addreviewshow=document.getElementById('addreviewbox');addreviewshow.style.display="none";}
function showreviewadd(itemid){var addreviewshow=document.getElementById('addreviewbox');addreviewshow.style.display="block";}
function escapeVal(textarea,replaceWith){textarea.value=escape(textarea.value);for(i=0;i<textarea.value.length;i++){if(textarea.value.indexOf("%0D%0A")>-1){textarea.value=textarea.value.replace("%0D%0A",replaceWith);}
else if(textarea.value.indexOf("%0A")>-1){textarea.value=textarea.value.replace("%0A",replaceWith);}
else if(textarea.value.indexOf("%0A%0A")>-1){textarea.value=textarea.value.replace("%0A%0A",replaceWith+replaceWith);}
else if(textarea.value.indexOf("%0D")>-1){textarea.value=textarea.value.replace("%0D",replaceWith);}}
textarea.value=unescape(textarea.value);}
function closereview(){var addreviewshow=document.getElementById('addreviewbox');addreviewshow.style.display="none";}
function sendreviewform(){var error='';var missingtext='false';var name=document.reviewform.name.value;var email=document.reviewform.email.value;var text=document.reviewform.reviewtext.value;var textmarker=document.reviewform.reviewtext;var mark;for(var i=0;i<document.reviewform.mark.length;i++)
{var temp=document.reviewform.mark[i];if(temp.checked)
{mark=temp.value;break;}}
var itemid=document.reviewform.itemid.value;if(name=="")
{var error=error+'Please enter your name \n';var missingtext='true';}
var match=/^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.(([0-9]{ 1,3})|([a-zA-Z]{2,6})|(aero|coop|info|museum|name))$/g.test(email);if(match==false)
{var error=error+'Please enter a real email address \n';var missingtext='true';}
if(email=="")
{var error=error+'Please enter your email \n';var missingtext='true';}
if(text=="")
{var error=error+'Please enter your text \n';var missingtext='true';}
if(mark==null)
{var error=error+'Please enter the mark \n';var missingtext='true';}
if(missingtext=='false'){escapeVal(textmarker,'<br />');var text=document.reviewform.reviewtext.value;makeGetRequest('/ReviewAdd.htm?item='+itemid+'&name='+name+'&email='+email+'&reviewtext='+text+'&mark='+mark,'addreviewbox');}else{alert(error);}}
function showflash()
{document.write('<object type="application/x-shockwave-flash" data="http://www.projectorpoint.co.uk/images/banners/selector-final.swf" width="149" height="182"> ');document.write('<param name="movie" value="http://www.projectorpoint.co.uk/images/banners/selector-final.swf" /> ');document.write('<param name="wmode" value="transparent" /> ');document.write('<param name="menu" value="false" />');document.write('<EMBED src="http://www.projectorpoint.co.uk/images/banners/selector-final.swf" menu=false quality=high bgcolor=##FFFFFF WIDTH="149" HEIGHT="182" NAME="effect" ALIGN=""TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/ge">');document.write('</EMBED>');document.write('</object>');}
function showflash2()
{document.write('<OBJECT type="application/x-shockwave-flash" data="http://www.projectorpoint.co.uk/images/projectorselectorDEMO.swf" WIDTH="406" HEIGHT="358" id="effect" ALIGN="" BORDER=0>');document.write('<PARAM NAME=movie VALUE="http://www.projectorpoint.co.uk/images/projectorselectorDEMO.swf" /> ');document.write('<param name="menu" value="false" /> ');document.write('<PARAM NAME=quality VALUE=high />');document.write('<EMBED src="http://www.projectorpoint.co.uk/images/projectorselectorDEMO.swf" menu=false quality=high bgcolor=##FFFFFF WIDTH="406" HEIGHT="358" NAME="effect" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/ge">');document.write('</EMBED>');document.write('</object>');}
function makeGetRequest(page,divId){var xmlHttp;xmlHttp=createRequestObject();xmlHttp.open('get',page,true);xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{if(xmlHttp.readyState==4){var response=xmlHttp.responseText;var divtochange=document.getElementById(divId);divtochange.innerHTML=response;}}}
xmlHttp.send(null);}
function createRequestObject(){var xmlHttp;try
{xmlHttp=new XMLHttpRequest();}
catch(e)
{try
{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e)
{try
{xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}
catch(e)
{alert("Your browser does not support AJAX!");return false;}}}
return xmlHttp;}
function createCookie(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();}
else var expires="";document.cookie=name+"="+value+expires+"; path=/";}
function readCookie(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}
return null;}
function eraseCookie(name){createCookie(name,"",-1);}<!--
var ua=navigator.userAgent
var ps=navigator.productSub
var dom=(document.getElementById)?1:0
var ie4=(document.all&&!dom)?1:0
var ie5=(document.all&&dom)?1:0
var nn4=(navigator.appName.toLowerCase()=="netscape"&&parseInt(navigator.appVersion)==4)
var nn6=(dom&&!ie5)?1:0
var sNav=(nn4||nn6||ie4||ie5)?1:0
var cssFilters=((ua.indexOf("MSIE 5.5")>=0||ua.indexOf("MSIE 6")>=0)&&ua.indexOf("Opera")<0)?1:0
var Style=[],Text=[],Text2=[],Count=0,sbw=0,move=0,hs="",mx,my,scl,sct,ww,wh,obj,sl,st,ih,iw,vl,hl,sv,evlh,evlw,tbody
var HideTip="eval(obj+sv+hl+';'+obj+sl+'=0;'+obj+st+'=-800')"
var doc_root=((ie5&&ua.indexOf("Opera")<0||ie4)&&document.compatMode=="CSS1Compat")?"document.documentElement":"document.body"
var PX=(nn6)?"px":""
if(sNav){window.onresize=ReloadTip
document.onmousemove=MoveTip
if(nn4)document.captureEvents(Event.MOUSEMOVE)}
if(nn4||nn6){mx="e.pageX"
my="e.pageY"
scl="window.pageXOffset"
sct="window.pageYOffset"
if(nn4){obj="document.TipLayer."
sl="left"
st="top"
ih="clip.height"
iw="clip.width"
vl="'show'"
hl="'hide'"
sv="visibility="}
else obj="document.getElementById('TipLayer')."}
if(ie4||ie5){obj="TipLayer."
mx="event.x"
my="event.y"
scl="eval(doc_root).scrollLeft"
sct="eval(doc_root).scrollTop"
if(ie5){mx=mx+"+"+100
my=my+"+"+80}}
if(ie4||dom){sl="style.left"
st="style.top"
ih="offsetHeight"
iw="offsetWidth"
vl="'visible'"
hl="'hidden'"
sv="style.visibility="}
if(ie4||ie5||ps>=20020823){ww="eval(doc_root).clientWidth"
wh="eval(doc_root).clientHeight"}
else{ww="window.innerWidth"
wh="window.innerHeight"
evlh=eval(wh)
evlw=eval(ww)
sbw=15}
function applyCssFilter(){if(cssFilters&&FiltersEnabled){var dx=" progid:DXImageTransform.Microsoft."
TipLayer.style.filter="revealTrans()"+dx+"Fade(Overlap=1.00 enabled=0)"+dx+"Inset(enabled=0)"+dx+"Iris(irisstyle=PLUS,motion=in enabled=0)"+dx+"Iris(irisstyle=PLUS,motion=out enabled=0)"+dx+"Iris(irisstyle=DIAMOND,motion=in enabled=0)"+dx+"Iris(irisstyle=DIAMOND,motion=out enabled=0)"+dx+"Iris(irisstyle=CROSS,motion=in enabled=0)"+dx+"Iris(irisstyle=CROSS,motion=out enabled=0)"+dx+"Iris(irisstyle=STAR,motion=in enabled=0)"+dx+"Iris(irisstyle=STAR,motion=out enabled=0)"+dx+"RadialWipe(wipestyle=CLOCK enabled=0)"+dx+"RadialWipe(wipestyle=WEDGE enabled=0)"+dx+"RadialWipe(wipestyle=RADIAL enabled=0)"+dx+"Pixelate(MaxSquare=35,enabled=0)"+dx+"Slide(slidestyle=HIDE,Bands=25 enabled=0)"+dx+"Slide(slidestyle=PUSH,Bands=25 enabled=0)"+dx+"Slide(slidestyle=SWAP,Bands=25 enabled=0)"+dx+"Spiral(GridSizeX=16,GridSizeY=16 enabled=0)"+dx+"Stretch(stretchstyle=HIDE enabled=0)"+dx+"Stretch(stretchstyle=PUSH enabled=0)"+dx+"Stretch(stretchstyle=SPIN enabled=0)"+dx+"Wheel(spokes=16 enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=0,motion=forward enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=0,motion=reverse enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=1,motion=forward enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=1,motion=reverse enabled=0)"+dx+"Zigzag(GridSizeX=8,GridSizeY=8 enabled=0)"+dx+"Alpha(enabled=0)"+dx+"Dropshadow(OffX=3,OffY=3,Positive=true,enabled=0)"+dx+"Shadow(strength=3,direction=135,enabled=0)"}}
function stm(t,s){if(sNav){if(t.length<2||s.length<25){var ErrorNotice="ProjectorPoint: ERROR NOTICE.\n"
if(t.length<2&&s.length<25)alert(ErrorNotice+"It looks like you removed an entry or more from the Style Array and Text Array of this tip.\nTheir should be 25 entries in every Style Array even though empty and 2 in every Text Array. You defined only "+s.length+" entries in the Style Array and "+t.length+" entry in the Text Array. This tip won't be viewed to avoid errors")
else if(t.length<2)alert(ErrorNotice+"It looks like you removed an entry or more from the Text Array of this tip.\nTheir should be 2 entries in every Text Array. You defined only "+t.length+" entry. This tip won't be viewed to avoid errors.")
else if(s.length<25)alert(ErrorNotice+"It looks like you removed an entry or more from the Style Array of this tip.\nTheir should be 25 entries in every Style Array even though empty. You defined only "+s.length+" entries. This tip won't be viewed to avoid errors.")}
else{var ab="";var ap=""
var titCol=(s[0])?"COLOR='"+s[0]+"'":""
var txtCol=(s[1])?"COLOR='"+s[1]+"'":""
var titBgCol=(s[2])?"BGCOLOR='"+s[2]+"'":""
var txtBgCol=(s[3])?"BGCOLOR='"+s[3]+"'":""
var titBgImg=(s[4])?"BACKGROUND='"+s[4]+"'":""
var txtBgImg=(s[5])?"BACKGROUND='"+s[5]+"'":""
var titTxtAli=(s[6]&&s[6].toLowerCase()!="left")?"ALIGN='"+s[6]+"'":""
var txtTxtAli=(s[7]&&s[7].toLowerCase()!="left")?"ALIGN='"+s[7]+"'":""
var add_height=(s[15])?"HEIGHT='"+s[15]+"'":""
if(!s[8])s[8]="Verdana,Arial,Helvetica"
if(!s[9])s[9]="Verdana,Arial,Helvetica"
if(!s[12])s[12]=1
if(!s[13])s[13]=1
if(!s[14])s[14]=200
if(!s[16])s[16]=0
if(!s[17])s[17]=0
if(!s[18])s[18]=10
if(!s[19])s[19]=10
hs=s[11].toLowerCase()
if(ps==20001108){if(s[2])ab="STYLE='border:"+s[16]+"px solid"+" "+s[2]+"'"
ap="STYLE='padding:"+s[17]+"px "+s[17]+"px "+s[17]+"px "+s[17]+"px'"}
var closeLink=(hs=="sticky")?"<TD ALIGN='right'><FONT SIZE='"+s[12]+"' FACE='"+s[8]+"'><A HREF='javascript:void(0)' ONCLICK='stickyhide()' STYLE='text-decoration:none;color:"+s[0]+"'><B>Close</B></A></FONT></TD>":""
var title=(t[0]||hs=="sticky")?"<TABLE WIDTH='100%' BORDER='0' CELLPADDING='0' CELLSPACING='0'><TR><TD "+titTxtAli+"><FONT SIZE='"+s[12]+"' FACE='"+s[8]+"' "+titCol+"><B>"+t[0]+"</B></FONT></TD>"+closeLink+"</TR></TABLE>":""
var txt="<TABLE "+titBgImg+" "+ab+" WIDTH='"+s[14]+"' BORDER='0' CELLPADDING='"+s[16]+"' CELLSPACING='0' "+titBgCol+" ><TR><TD>"+title+"<TABLE WIDTH='100%' "+add_height+" BORDER='0' CELLPADDING='"+s[17]+"' CELLSPACING='0' "+txtBgCol+" "+txtBgImg+"><TR><TD "+txtTxtAli+" "+ap+" VALIGN='top'><FONT SIZE='"+s[13]+"' FACE='"+s[9]+"' "+txtCol+">"+t[1]+"</FONT></TD></TR></TABLE></TD></TR></TABLE>"
if(nn4){with(eval(obj+"document")){open()
write(txt)
close()}}
else eval(obj+"innerHTML=txt")
tbody={Pos:s[10].toLowerCase(),Xpos:s[18],Ypos:s[19],Transition:s[20],Duration:s[21],Alpha:s[22],ShadowType:s[23].toLowerCase(),ShadowColor:s[24],Width:parseInt(eval(obj+iw)+3+sbw)}
if(ie4){TipLayer.style.width=s[14]
tbody.Width=s[14]}
Count=0
move=1}}}
function MoveTip(e){if(move){var X,Y,MouseX=eval(mx),MouseY=eval(my);tbody.Height=parseInt(eval(obj+ih)+3)
tbody.wiw=parseInt(eval(ww+"+"+scl));tbody.wih=parseInt(eval(wh+"+"+sct))
switch(tbody.Pos){case"left":X=MouseX-tbody.Width-tbody.Xpos;Y=MouseY+tbody.Ypos;break
case"center":X=MouseX-(tbody.Width/2);Y=MouseY+tbody.Ypos;break
case"float":X=tbody.Xpos+eval(scl);Y=tbody.Ypos+eval(sct);break
case"fixed":X=tbody.Xpos;Y=tbody.Ypos;break
default:X=MouseX+tbody.Xpos;Y=MouseY+tbody.Ypos}
if(tbody.wiw<tbody.Width+X)X=tbody.wiw-tbody.Width
if(tbody.wih<tbody.Height+Y+sbw){if(tbody.Pos=="float"||tbody.Pos=="fixed")Y=tbody.wih-tbody.Height-sbw
else Y=MouseY-tbody.Height}
if(X<0)X=0
eval(obj+sl+"=X+PX;"+obj+st+"=Y+PX")
ViewTip()}}
function ViewTip(){Count++
if(Count==1){if(cssFilters&&FiltersEnabled){for(Index=28;Index<31;Index++){TipLayer.filters[Index].enabled=0}
for(s=0;s<28;s++){if(TipLayer.filters[s].status==2)TipLayer.filters[s].stop()}
if(tbody.Transition==51)tbody.Transition=parseInt(Math.random()*50)
var applyTrans=(tbody.Transition>-1&&tbody.Transition<24&&tbody.Duration>0)?1:0
var advFilters=(tbody.Transition>23&&tbody.Transition<51&&tbody.Duration>0)?1:0
var which=(applyTrans)?0:(advFilters)?tbody.Transition-23:0
if(tbody.Alpha>0&&tbody.Alpha<100){TipLayer.filters[28].enabled=1
TipLayer.filters[28].opacity=tbody.Alpha}
if(tbody.ShadowColor&&tbody.ShadowType=="simple"){TipLayer.filters[29].enabled=1
TipLayer.filters[29].color=tbody.ShadowColor}
else if(tbody.ShadowColor&&tbody.ShadowType=="complex"){TipLayer.filters[30].enabled=1
TipLayer.filters[30].color=tbody.ShadowColor}
if(applyTrans||advFilters){eval(obj+sv+hl)
if(applyTrans)TipLayer.filters[0].transition=tbody.Transition
TipLayer.filters[which].duration=tbody.Duration
TipLayer.filters[which].apply()}}
eval(obj+sv+vl)
if(cssFilters&&FiltersEnabled&&(applyTrans||advFilters))TipLayer.filters[which].play()
if(hs=="sticky")move=0}}
function stickyhide(){eval(HideTip)}
function ReloadTip(){if(nn4&&(evlw!=eval(ww)||evlh!=eval(wh)))location.reload()
else if(hs=="sticky")eval(HideTip)}
function htm(){if(sNav){if(hs!="keep"){move=0;if(hs!="sticky")eval(HideTip)}}}
function ShowIt(t){$(t).addClass("sfhover");$(t).find(" > ul").css("left","auto");bum=$(t).find(" > ul").get(0);if(findPosX(bum)+bum.offsetWidth>=getWidth()){$(t).find(" > ul").css("left","-250px");rev=1}}
function HideIt(t){$(t).find(" > ul").css("left","-999em");$(t).removeClass("sfhover");};function getWidth(){var myWidth=0
if(typeof(window.innerWidth)=='number'){myWidth=window.innerWidth;}else if(document.documentElement&&(document.documentElement.clientWidth)){myWidth=document.documentElement.clientWidth;}else if(document.body&&(document.body.clientWidth)){myWidth=document.body.clientWidth;}
return myWidth;}
function findPosX(obj){var curleft=0;if(obj.offsetParent)
while(1)
{curleft+=obj.offsetLeft;if(!obj.offsetParent)
break;obj=obj.offsetParent;}
else if(obj.x)
curleft+=obj.x;return curleft;}
function init()
{noConflictCode();}
function noConflictCode()
{var $j=jQuery.noConflict();$j(".main > dd:visible").hide();$j(".main > dt a").click(function(){var $j=jQuery.noConflict();createCookie("mainmenuvalue","#"+this.id,1);$j(".main > dd:visible").slideUp("slow");$j(this).parent().next().slideDown("slow");return false;});$j(".main > dt").click(function()
{var $j=jQuery.noConflict();$j(this).children("a").click();});$j(".sub > dd:visible").hide();$j(".sub > dt a").click(function(){var $j=jQuery.noConflict();createCookie("submenuvalue","#"+this.id,1);$j(".sub > dd:visible").slideUp("slow");$j(this).parent().next().slideDown("slow");return false;});$j(".sub > dt").click(function()
{var $j=jQuery.noConflict();$j(this).children("a").click();});var mainMenu=readCookie('mainmenuvalue');var subMenu=readCookie('submenuvalue');if(mainMenu==""||mainMenu==null)
{$j('#Projectors').click();mainMenu='#Projectors';if(document.location.toString().toLowerCase().indexOf('screenstore.com')>0)
{$j('#Screens').click();mainMenu='#Screens';}}
else
{$j(mainMenu).click();}
if(mainMenu=='#Projectors')
{if(subMenu==""||subMenu==null)
{$j('#HomeCinema').click();}
else
{$j(subMenu).click();}}
var ImageGroup=readCookie('imagegroup');$j("#CookieTest").html("Main Menu :"+mainMenu+" SubMenu :"+subMenu+" ImageGroup :"+ImageGroup);}
function StandardCode()
{$(".main > dd:visible").hide();$(".main > dt a").click(function(){createCookie("mainmenuvalue","#"+this.id,1);$(".main > dd:visible").slideUp("slow");$(this).parent().next().slideDown("slow");return false;});$(".main > dt").click(function()
{$(this).children("a").click();});$(".sub > dd:visible").hide();$(".sub > dt a").click(function(){createCookie("submenuvalue","#"+this.id,1);$(".sub > dd:visible").slideUp("slow");$(this).parent().next().slideDown("slow");return false;});$(".sub > dt").click(function()
{$(this).children("a").click();});var mainMenu=readCookie('mainmenuvalue');var subMenu=readCookie('submenuvalue');if(mainMenu==""||mainMenu==null)
{$('#Projectors').click();mainMenu='#Projectors';}
else
{$(mainMenu).click();}
if(mainMenu=='#Projectors')
{if(subMenu==""||subMenu==null)
{$('#HomeCinema').click();}
else
{$(subMenu).click();}}
var ImageGroup=readCookie('imagegroup');$("#CookieTest").html("Main Menu :"+mainMenu+" SubMenu :"+subMenu+" ImageGroup :"+ImageGroup);}
function initRHSMenu()
{var $j=jQuery.noConflict();var date=new Date();var t=date.getTime()
$j.ajax({type:"GET",url:"/RHSMenu.cfm?t="+t,dataType:"html",success:function(msg){$j("#banner").html(msg);}})}
function initRatingAndFeedback()
{var $j=jQuery.noConflict();$j('#commentPanel').hide();$j('#formScore :radio.star').rating({callback:function(value,link){$j('#commentPanel').show();$j('#btnSubmit').attr("disabled","");}});$j('#formScore').submit(function(){$j('#btnSubmit').attr("disabled","disabled");$j('#commentPanel').hide();$j('.test',this).html('');$j('input',this).each
(function()
{if(this.name!='')
{$j.ajax({type:"POST",url:"http://www.projectorpoint.co.uk/scoreRating.aspx",data:"ratingValue="+this.value+"&feedbackValue="+$j('#txtFeedback').val()+"&locationValue="+window.location,success:function(msg){}});}});return false;});}
function initTabs()
{var $j=jQuery.noConflict();try
{$j('#tabBackground').corner("top");$j('#shortGuidePanel').corner();$j('.searchMorePanel').corner();$j('#txtScreenFilterValue').numeric();}
catch(e)
{}
try
{var customTab=$j("#screenFormat").val();if(customTab!=null)
{$j('#container-1').tabs(parseInt(customTab));}
else
{$j('#container-1').tabs();}}
catch(e)
{}
$j("#ddlProjectorAspectRatio").change(function(){populateAspectRatioSelection();});}
function showInfo(name)
{var $j=jQuery.noConflict();$j('#'+name).show();}
function hideInfo(name)
{var $j=jQuery.noConflict();$j('#'+name).hide();}
function filterChange(txtQty,currentPage)
{var $j=jQuery.noConflict();if($j(txtQty).val()!="")
{window.location=currentPage.replace("/","")+"?sort="+$j(txtQty).val();}}
function shortGuide()
{var $j=jQuery.noConflict();$j("#shortGuidePanel").toggle();}
function toggleSearchMore(a)
{var $j=jQuery.noConflict();$j("#"+a).slideToggle();}
function trim(str)
{str=this!=window?this:str;return str.replace(/^\s+|\s+$/g,'');}
function populateAspectRatioSelection()
{var $j=jQuery.noConflict();var ddlValues=$j("#ddlProjectorAspectRatio").val().split("|");var aspectRatio=ddlValues[0];if(aspectRatio=='16:9')
{$j("#spAspectRatio").html("This is a <strong>Video (16:9)</strong> format projector");}
else
{$j("#spAspectRatio").html("This is a <strong>Video (4:3)</strong> format projector");}}
function getCustomFilterQuery()
{var $j=jQuery.noConflict();var ddlValues=$j("#ddlProjectorAspectRatio").val().split("|");var aspectRatio=ddlValues[0];var imgWidth=0;var imgHeight=0;var imgDiagonal=0;if($j("#ddlScreenFilterOptions").val()=='ViewingWidth')
{imgWidth=Number($j("#txtScreenFilterValue").val());if(aspectRatio=='16:9')
{imgHeight=imgWidth-(imgWidth*0.4375);imgDiagonal=imgWidth+(imgWidth*0.1473333333);}
else
{imgHeight=imgWidth-(imgWidth*0.25);imgDiagonal=imgWidth+(imgWidth*0.25);}}
else if($j("#ddlScreenFilterOptions").val()=='ViewingHeight')
{imgHeight=Number($j("#txtScreenFilterValue").val());if(aspectRatio=='16:9')
{imgDiagonal=(imgHeight*2.0395);imgWidth=(imgHeight*1.777777)}
else
{imgDiagonal=(imgHeight*1.6666666);imgWidth=(imgHeight*1.33333333)}}
else if($j("#ddlScreenFilterOptions").val()=='diagonal')
{imgDiagonal=Number($j("#txtScreenFilterValue").val());if(aspectRatio=='16:9')
{imgHeight=(imgDiagonal*0.49091)
imgWidth=(imgDiagonal*0.87247)}
else
{imgHeight=(imgDiagonal/1.667)
imgWidth=(imgHeight*1.3333333333)}}
if(Number(ddlValues[2])>0&&Number(ddlValues[1])>0)
{var minScrnRatio=(1/Number(ddlValues[2])*parseInt(imgWidth)/100);var maxScrnRatio=(1/Number(ddlValues[1])*parseInt(imgWidth)/100);$j("#screenInfoPanel").html('<table> <tr> <td style="width: 200px;"> Throw distance (min / max) </td> <td> : '+minScrnRatio.toFixed(2)+' / '+maxScrnRatio.toFixed(2)+' m </td> </tr> <tr> <td style="width: 200px;"> Image height </td> <td> : '+Math.round(imgHeight)+' cm </td> </tr> <tr> <td style="width: 200px;"> Image width </td> <td> : '+Math.round(imgWidth)+' cm </td> </tr> <tr> <td style="width: 200px;"> Image diagonal </td> <td> : '+Math.round(imgDiagonal)+' cm </td> </tr> </table><br/><br/>');}
else
{$j("#screenInfoPanel").html('<br/><br/><br/><br/><br/>');}
var rtn="";try
{var screenFilterValue;var screenFilterValueMin;var screenFilterValueMax;if($j("#txtScreenFilterValue").val()=="")
{rtn=" AND ViewingWidth BETWEEN 170 AND 190 "}
else
{screenFilterValue=imgWidth;screenFilterValueMin=parseInt(screenFilterValue)-20;screenFilterValueMax=parseInt(screenFilterValue)+20;rtn=" AND ViewingWidth BETWEEN "+screenFilterValueMin+" AND "+screenFilterValueMax;}}
catch(e)
{rtn=" AND ViewingWidth BETWEEN 170 AND 190 ";}
return" AND (AspectRatio = '"+aspectRatio+"' OR (AspectRatio = '1:1' AND screenType = 'portable'))"+rtn;}
function getfilterdata3(tabIds,categoryName)
{var $j=jQuery.noConflict();if($j("#txtScreenFilterValue").val()=="")
{alert("Please enter your desired value");return;}
else
{var level2WHEREClause="";$j.each($j(".checkboxList"),function(i,n){if($j(n).attr("checked")!=true)
{if(level2WHEREClause=="")
{level2WHEREClause=level2WHEREClause+" NOT "+$j(n).val();}
else
{level2WHEREClause=level2WHEREClause+" AND NOT "+$j(n).val();}}});tabIds=trim(tabIds);var tabCollection=tabIds.split(" ");var customerTabQuery=getCustomFilterQuery();for(x in tabCollection)
{var h0=tabCollection[x];var h="#hidden";var orderByIndex=$j(h+h0).val().toLowerCase().lastIndexOf('order by');var tabQuery=$j(h+h0).val().toLowerCase();var orderByQuery=tabQuery.substring(orderByIndex);var cleanTabQuery=tabQuery.replace(orderByQuery,'');if(level2WHEREClause!="")
{var cleanTabQuery=cleanTabQuery+customerTabQuery+" AND "+level2WHEREClause+" "+orderByQuery;}
else
{var cleanTabQuery=cleanTabQuery+customerTabQuery+" "+orderByQuery;}
var urlTarget='tabfilterresults2.cfm?q='+cleanTabQuery+"&t="+tabCollection[x]+"&cat="+categoryName;$j("#contentPanel"+tabCollection[x]).html("<img src='images/loading.gif' title='loading' align='middle'/>&nbsp;loading....");$j("#contentPanel"+tabCollection[x]).load(urlTarget);}}}
function getfilterdata2(tabIds,categoryName)
{var level2WHEREClause="";var $j=jQuery.noConflict();$j.each($j(".checkboxList"),function(i,n){if($j(n).attr("checked")!=true)
{if(level2WHEREClause=="")
{level2WHEREClause=level2WHEREClause+" NOT "+$j(n).val();}
else
{level2WHEREClause=level2WHEREClause+" AND NOT "+$j(n).val();}}});tabIds=trim(tabIds);var tabCollection=tabIds.split(" ");for(x in tabCollection)
{var h0=tabCollection[x];var h="#hidden";var orderByIndex=$j(h+h0).val().toLowerCase().lastIndexOf('order by');var tabQuery=$j(h+h0).val().toLowerCase();var orderByQuery=tabQuery.substring(orderByIndex);var cleanTabQuery=tabQuery.replace(orderByQuery,'');var customerTabQuery="";if(categoryName.toLowerCase().match("screen"))
{customerTabQuery=getCustomFilterQuery();}
if(level2WHEREClause!="")
{var cleanTabQuery=cleanTabQuery+customerTabQuery+" AND "+level2WHEREClause+" "+orderByQuery;}
else
{var cleanTabQuery=cleanTabQuery+customerTabQuery+" "+orderByQuery;}
var urlTarget='tabfilterresults2.cfm?q='+cleanTabQuery+"&t="+tabCollection[x]+"&cat="+categoryName;$j("#contentPanel"+tabCollection[x]).html("<img src='images/loading.gif' title='loading' align='middle'/>&nbsp;loading....");$j.ajax({url:urlTarget,async:false,success:function(msg){$j("#contentPanel"+tabCollection[x]).html(msg);}})}}
function getfilterdata(level,tabid,cat,filterName,qryname,className)
{var $j=jQuery.noConflict();var tabidnum=tabid.substring(5);var all='true';var check='0 ';$j("#contentPanel"+tabid).html("<img src='images/loading.gif' title='loading' align='middle'/>&nbsp;loading....");for(i=1;i<=level;i++)
{var boxname='#box'+tabid+i;if($j(boxname).attr("checked"))
{all='false';}
else if($j(boxname).attr("checked")=="undefined")
{check=check+i+' ';}
else
{check=check+i+' ';}}
var currentTime=new Date();var urlTarget='tabfilterresults.cfm?level='+level+'&tabcategory='+tabidnum+'&cat='+cat+'&check='+check+'&filter='+filterName+'&qryname='+qryname+"&time="+currentTime.getSeconds();$j.ajax({type:"GET",url:urlTarget,success:function(msg)
{filter(msg,all,tabid);},error:function(msg,msg1,msg2)
{alert("Error :"+msg+" "+msg1+" "+msg2);}});}
function filter(response,all,tabid,className){var $j=jQuery.noConflict();$j("#contentPanel"+tabid).html("");$j("#contentPanel"+tabid).html(response);}
