var productId = new Array();
productId[0] = "rProducts";
productId[1] = "rWallcaps";
productId[2] = "rColumns";
productId[3] = "rBalustrades";
productId[4] = "rMoulding";
productId[5] = "rPavers";
productId[6] = "rPilaster";
productId[7] = "rStair";
productId[8] = "rWall";
productId[9] = "rBenches";
productId[10] = "rFireplaces";
productId[11] = "rPots";
productId[12] = "rAccessories";
productId[13] = "rPlaques";
productId[14] = "rCorbels";
productId[15] = "rFinials";
productId[16] = "rKeystones";
productId[17] = "rFire";

var slideId = new Array();
slideId[0] = "pic-sf";
slideId[1] = "pic-lf";
slideId[2] = "pic-owf";
slideId[3] = "desc-sf";
slideId[4] = "desc-lf";
slideId[5] = "desc-owf";

function initSlideClear() {
	for(i=0; i<6; i++) {
		document.getElementById(slideId[i]).style.display = "none";
	}
}

function initClear() {
	for(i=0; i<18; i++) {
		document.getElementById(productId[i]).style.display = "none";
	}
}

function fblock(b) {
	if (document.getElementById(b)) {
	document.getElementById(b).style.display ='block';
	if ((BrowserDetect.browser=='Explorer') && (BrowserDetect.version == 6))
	    document.getElementById('him').style.marginTop ='-14px';
}}
function fnone(b) {
	if (document.getElementById(b)) {
	document.getElementById(b).style.display ='none';
	if ((BrowserDetect.browser=='Explorer') && (BrowserDetect.version == 6))
	    document.getElementById('him').style.marginTop ='0px';
}}



function show(pID){
	initClear();	
	document.getElementById('r'+pID).style.display ='block';
}
function showSlide(pID){
	initSlideClear();
	document.getElementById('pic-'+pID).style.display ='block';
	document.getElementById('desc-'+pID).style.display ='block';
}

function replacePic (picID) {
	pic=picID.substr(0, 2);
	if (pic=='sf') path = "sand/"+picID;
	if (pic=='lf') path = "limestone/"+picID;
	if (pic=='ow') { path = "oldworld/"+picID; pic = pic+"f";}
	document.getElementById('pic-'+pic).innerHTML = "<img src='pic/"+path+"' />";
}

function checkFill (a,b,c) { 
     element=document.getElementById(c).value;
	if ((document.getElementById(a).value =='') || (document.getElementById(b).value =='') ||(element =='')) return false;
	 else if ((element.indexOf('@')==-1) || (element.indexOf('\.')==-1)) return false;
	  else return true;
}
function errorPrint(a) {
	theElement = document.getElementById(a+'-error-message');
	theElement.style.display = 'block';
	theElement.innerHTML = "fields are filled with incorrect data";
}