// JavaScript Document

// POPUPS //
$(document).ready(function() {

$("#inlinecontent1").fancybox({
	'titlePosition'		: 'inside',
	'transitionIn'		: 'none',
	'transitionOut'		: 'none'
});

$("#inlinecontent2").fancybox({
	'titlePosition'		: 'inside',
	'transitionIn'		: 'none',
	'transitionOut'		: 'none'
});

$("#inlinecontent3").fancybox({
	'titlePosition'		: 'inside',
	'transitionIn'		: 'none',
	'transitionOut'		: 'none'
});

$("#inlinecontent4").fancybox({
	'titlePosition'		: 'inside',
	'transitionIn'		: 'none',
	'transitionOut'		: 'none'
});


$("#various2").fancybox();

$("#generic").fancybox({
	'width'				: '75%',
	'height'			: '95%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});	
	
$("#generic2").fancybox({
	'width'				: '75%',
	'height'			: '95%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});		

$("#generic3").fancybox({
	'width'				: '75%',
	'height'			: '95%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});		

$("#mullican").fancybox({
	'width'				: '85%',
	'height'			: '95%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});	

$("#armstrong").fancybox({
	'width'				: '85%',
	'height'			: '95%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});	
	
$("#durkan").fancybox({
	'width'				: '85%',
	'height'			: '95%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});	
	
$("#somerset").fancybox({
	'width'				: '85%',
	'height'			: '95%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});
	
$("#mirage").fancybox({
	'width'				: '85%',
	'height'			: '95%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});	
	
$("#mannington").fancybox({
	'width'				: '85%',
	'height'			: '95%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});	

$("#anderson").fancybox({
	'width'				: '85%',
	'height'			: '95%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});	

$("#tandus").fancybox({
	'width'				: '75%',
	'height'			: '96%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
});

$("#bigelow").fancybox({
	'width'				: '75%',
	'height'			: '96%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
});

$("#cambridge").fancybox({
	'width'				: '75%',
	'height'			: '96%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
});
$("#masland").fancybox({
	'width'				: '75%',
	'height'			: '96%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
});

$("#masland-rugs").fancybox({
	'width'				: '75%',
	'height'			: '96%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
});

$("#patcraft").fancybox({
	'width'				: '75%',
	'height'			: '96%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
});

$("#shaw-contract").fancybox({
	'width'				: '75%',
	'height'			: '96%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
});

$("#lees").fancybox({
	'width'				: '75%',
	'height'			: '96%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
});

$("#azrock").fancybox({
	'width'				: '75%',
	'height'			: '96%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
});

$("#karastan-contract").fancybox({
	'width'				: '75%',
	'height'			: '96%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
});

$("#nourison").fancybox({
	'width'				: '75%',
	'height'			: '96%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
});

$("#johnsonite").fancybox({
	'width'				: '75%',
	'height'			: '96%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
});

$("#stanton").fancybox({
	'width'				: '75%',
	'height'			: '96%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
});

$("#product1").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});

$("#product2").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});
	
$("#product3").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});
	
$("#product4").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});
	
$("#product5").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});
	
$("#product6").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});
	
$("#product7").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});
	
$("#product8").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});
	
$("#product9").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});
	
$("#product10").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});
	
$("#product11").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});
	
$("#product12").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});
	
$("#product13").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});

$("#product14").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});	
	
$("#product15").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});
	
$("#product16").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});
	
$("#product17").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});
	
$("#product18").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});
	
$("#product19").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});
	
$("#product20").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});

$("#product21").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});		
	
$("#product22").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});	
	
$("#product23").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});	
	
$("#product24").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});	
	
$("#product25").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});		
	
$("#product26").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});		
	
$("#product27").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});		
	
$("#product28").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});		
	
$("#product29").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});		
	
$("#product30").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});		
	
$("#product31").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});		
	
$("#product32").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});		
	
$("#product33").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});		
	
$("#product34").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});		
	
$("#product35").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});		
	
$("#product36").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});		
	
$("#product37").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});		
	
$("#product38").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});		
	
$("#product39").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});		
	
$("#product40").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});		
	
$("#product41").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});		
	
$("#product42").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});		
	
$("#product43").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});		
	
$("#product44").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});		
	
$("#product45").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});		
	
$("#product46").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});		
	
$("#product47").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});		
	
$("#product48").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});		
	
$("#product49").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});		
	
$("#product50").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});	
	
$("#various4").fancybox({
	'padding'			: 0,
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none'
});
	
$("#hardwood1").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});
	
$("#hardwood2").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});

$("#hardwood3").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});

$("#hardwood4").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});

$("#hardwood5").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});

$("#hardwood6").fancybox({
	'width'				: '30%',
	'height'			: '45%',
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
	});

});




//////////////////////////// Validation ////////////////////////////////////

function validate() {

var msg = '';
var err = false;
msg="________________________________________________________\n\n";

msg=msg +"The form was not submitted because of following error(s).\n";

msg=msg +"Please correct these error(s) and resubmit\n";

msg=msg +"________________________________________________________\n\n";

msg=msg + "The following required field(s) are empty or have an invalid format : \n\n";//forEmail(document.form1.mobilephone)
function forEmail(obj)
{

if (!/^[A-Za-z0-9\.\_\-]+\@[A-Za-z0-9\.\_\-]+(\.[A-Za-z]+)+$/.test(obj.value))
return true ;
else
return false ;

}
//forPhone(document.form1.mobilephone)
function forPhone(obj)
{

var str = obj.value ;
var re = /^[-]?\d*\.?\d*$/;

if (!re.test(str) || (obj.value.length == 0))
return true ;
else
return false ;

}

//forNumber(document.form1.mobilephone)
function forNumber(obj)
{

var str = obj.value ;
var re = /^[-]?\d+$/;

if (!re.test(str))
return true ;
else
return false ;

}

if(document.form1.Name.value=='Name') { msg += '- Please Fill Name\n' ; document.getElementById('Name').style.background='#DDDDDD'; err = 'true' ; } else { document.getElementById('Name').style.background='white'; }

if(document.form1.Phone.value=='Phone') { msg += '- Please Fill Phone\n' ; document.getElementById('Phone').style.background='#DDDDDD'; err = 'true' ; } else { document.getElementById('Phone').style.background='white'; }

if(document.form1.Email.value=='Email') { msg += '- Please Fill Email\n' ; document.getElementById('Email').style.background='#DDDDDD'; err = 'true' ; } else { document.getElementById('Email').style.background='white'; }

if(document.form1.Address.value=='Address') { msg += '- Please Fill Address\n' ; document.getElementById('Address').style.background='#DDDDDD'; err = 'true' ; } else { document.getElementById('Address').style.background='white'; }

if(document.form1.What_are_you_interested_in.value=='Please Fill What are you interested in?') { msg += '- What are you interested in?\n' ; document.getElementById('What_are_you_interested_in').style.background='#DDDDDD'; err = 'true' ; } else { document.getElementById('What_are_you_interested_in').style.background='white'; }

if (err)
{
alert(msg) ;
return false ;
}
else
{
return true ;
} 
}
