// JavaScript Document

function openwindow()
{
	window.open("life-time-warranty.html","mywindow","menubar=1,resizable=1,width=680,height=450");
}


$(document).ready(function(){
$('.hide').click(function(){
$('#show').show();
$('#photot_0').hide();
});
});
$(document).ready(function(){
$('.hide1').click(function(){
});
});
		
//<![CDATA[ 
function switch_product_img2(divName, totalImgs, tile, foldername, prodname) {
var i =0;
for (i=0; i<totalImgs; i++) {
var showDivName = 'roomt_' + i;
var str_params = "'photot_0', '" + parseInt(totalImgs) + "' ,'photo_0', '"+tile+"', '"+foldername+"'";
var str = '<a href="javascript:void(0)" onclick="switch_product_img3('+str_params+')" ><img class="hide1 img-brdr" src=floor-images/'+foldername+'/images/' + tile+ ' height=80px width=80px/></a>';
document.getElementById(showDivName).innerHTML =str;
document.getElementById('prodname').innerHTML =prodname;
document.getElementById('product_src').value="http://www.expressflooring.com/floor-images/"+foldername+"/images/" + tile;
document.getElementById('product_name').value=prodname;
var showObj = document.getElementById(showDivName);
if (showDivName == divName)
showObj.style.display = 'block';
else
showObj.style.display = 'none';
}
}
function switch_product_img3(divName, totalImgs, divName2, img ,foldername ) {
for (var i=0; i<totalImgs; i++) {
var showDivName = 'photot_' + i;
var showObj = document.getElementById(showDivName);
document.getElementById(showDivName).innerHTML = "<img  width='375' height='375' src='floor-images/"+foldername+"/images/" + img+"' />"; 


var showDivName2 = 'photo_' + i;
var showObj2 = document.getElementById(showDivName2);
if (showDivName == divName){
showObj.style.display = 'block';
}
else {
showObj.style.display = 'none';
showObj2.style.display = 'none';}
}
$('#show').hide();
}
function switch_product_img6()
{
$('$show').show();
}
//]]>

function openwindow()
{
	window.open("http://www.expressflooring.com/life-time-warranty.html","mywindow","menubar=1,resizable=1,width=680,height=450");
}


var swfVersionStr = "10.0.0";
var xiSwfUrlStr = "playerProductInstall.swf";
var flashvars = {};
var params = {};
params.quality = "high";
params.bgcolor = "#ffffff";
params.allowscriptaccess = "sameDomain";
params.allowfullscreen = "true";
var attributes = {};
attributes.id = "interiorAppAway";
attributes.name = "interiorAppAway";
attributes.align = "middle";
swfobject.embedSWF(
"interiorAppAway.swf?xmlFile=config1.xml", "flashContent", 
"375", "375", 
swfVersionStr, xiSwfUrlStr, 
flashvars, params, attributes);
swfobject.createCSS("#flashContent", "display:block;text-align:left;");

function getFlashMovie(movieName)
{
var isIE = navigator.appName.indexOf("Microsoft") != -1;
return (isIE) ? window[movieName] : document[movieName];
}
function setFloor(str) 
{
$('#photot_0').hide();
$('#show').show();
setTimeout('hari("'+str+'")', 1000);
}
function hari(str)
{
var isIE = navigator.appName.indexOf("Microsoft") != -1;
if(isIE)
{
getFlashMovie("interiorAppAway").updateFloor(window.images[str].src);
}
else
{
getFlashMovie("interiorAppAway").updateFloor(document.images[str].src);
}
}


var swfVersionStr = "10.0.0";
var xiSwfUrlStr = "playerProductInstall.swf";
var flashvars = {};
var params = {};
params.quality = "high";
params.bgcolor = "#ffffff";
params.allowscriptaccess = "sameDomain";
params.allowfullscreen = "true";
var attributes = {};
attributes.id = "interiorAppAway1";
attributes.name = "interiorAppAway1";
attributes.align = "middle";
swfobject.embedSWF(
"interiorAppAway.swf?xmlFile=config1.xml", "flashContent1", 
"375", "375", 
swfVersionStr, xiSwfUrlStr, 
flashvars, params, attributes);
swfobject.createCSS("#flashContent1", "display:block;text-align:left;");
function getFlashMovie1(movieName) {
var isIE = navigator.appName.indexOf("Microsoft") != -1;
return (isIE) ? window[movieName] : document[movieName];
}
function setFloor(str) 
{
$('#photot_0').hide();
$('#show').show();
setTimeout('hari("'+str+'")', 1000);
}
function hari(str)
{
getFlashMovie("interiorAppAway").updateFloor(document.images[str].src);
}


var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-10380316-2']);
  _gaq.push(['_trackPageview']);
  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
  
function printDiv(id)
{
 var divToPrint=document.getElementById(id);
 var newWin=window.open("","PrintWindow",'width=820,height=470');
 newWin.document.open();
 newWin.document.write('<html xmlns="http://www.w3.org/1999/xhtml"><head><link type=\"text/css\" rel=\"stylesheet\" media=\"all\" href=\"includes/styles.css\" /></head><body onload="window.print()"><br/>'+divToPrint.innerHTML+'<div style="font-size:11px;font-family:Verdana;text-align:justify;" ><b>ALL OFFERS DISCLAIMER:</b>Express Flooring provides many different promotions in order to be able to serve all our potential clients needs, budgets, living conditions and lifestyles. Our hope is to provide every customer an opportunity to have the flooring of their choice combined with the best pricing and value available. Due to our competitive nature and rapid changing industry promotions, Express Flooring may cancel an advertised offer at any time.Promotions may not be combined with other sale items or offers. Only one promotion per household and commercial jobs are excluded. Offers must be presented at time of initial consultation before quote is given. Offers presented by customers after price quote may be refused.Offers are for in-stock items only and all prior orders are excluded. All offers are subject to change without given notice.All offers require minimum purchase amount of $1,000.00 after sales tax and any promotions are subtracted.</div></body></html>');
 newWin.document.close();
 setTimeout(function(){newWin.close();},5000000);
}

function onYouTubePlayerReady(playerId) { 
ytplayer = document.getElementById("video_overlay"); 
ytplayer.setVolume(100); 
}

function checkBoxValidationForSingle(checkBoxName,code)
 {
  var name=checkBoxName+'[]';
  var hasChecked=false;
  var chk=document.getElementsByName(name);
  for(var i=0, c=0; i<chk.length ; i++)
    {
	 if(chk[i].checked==true)
	  { 
	   c++;
	   var cValue = chk[i].value;
	   hasChecked = true;
	  }
	}
 if(!hasChecked) 
   {
	chk[i].checked==false;
    return false;
   }else if(c > 1){ 
      alert('Please select only one offer');
	  return false;
      }else {
	       window.location.href='request-free-estimate.php?off='+code;
	  return cValue;
   	  return true;
   }
 } 

