
/* _________________________________________________________________________________________________________________________

Domino Commercial Interiors JavaScipt Functions and Variables.
John Mounsey 2006-present.
__________________________________________________________________________________________________________________________*/

var telePhone		= '(0114) 254 1900'
var fax			= '(0114) 254 1901'
var postCode		= 'S13 9NR'

/* ====================================================
HI-lite for form fields
==================================================== */

function hi(field)	{ field.className = 'formboxHI';}
function lo(field)	{ field.className = 'formbox';	}



/* _________________________________________________________________________________________________________________________

Detect browser
__________________________________________________________________________________________________________________________*/

if (document.all)							{ browser="ie"; }
else if (document.layers)		 				{ browser="n4"; }   
else if (!document.all && document.getElementById)	{ browser="n6"; }



/* _________________________________________________________________________________________________________________________

MENU slide controls
__________________________________________________________________________________________________________________________*/

function setStyleById(i, p, v)

{
var n = document.getElementById(i);
n.style[p] = v;
}

	var rangeRef, styleObj, endObj;
    
	layerSwitch="document.all";
	styleSwitch=".style";
	
	 
new ypSlideOutMenu("001", "down", 200, 300, 250, 300);
new ypSlideOutMenu("002", "down", 200, 300, 250, 300);
new ypSlideOutMenu("003", "down", 200, 300, 250, 300);
new ypSlideOutMenu("004", "down", 200, 300, 250, 300);

function moveMenu(MenuName) {
var oSource = event.srcElement;
 if (oSource != '') {
var Left = getPageLeft(oSource) ;
var Top = getPageTop(oSource) ;
var MenuChild = window.document.all[(MenuName)];   
MenuChild.style.left = Left +0; 
MenuChild.style.top = Top +23; 
}
}

function getPageLeft(obj) {
	
		var goUp = 0;
		var parent = obj;

		while (parent && parent.tagName != "BODY" &&
			parent.tagName != "HTML") {
				goUp += parent.offsetLeft;
				parent = parent.offsetParent;
		}

		return goUp;
	}


function getPageTop(obj) {
	
		var goUp = 0;
		var parent = obj;

		while (parent && parent.tagName != "BODY" &&
			parent.tagName != "HTML") {
				goUp += parent.offsetTop;
				parent = parent.offsetParent;
		}

		return goUp;
	}

/* _________________________________________________________________________________________________________________________

Output Terms popup
__________________________________________________________________________________________________________________________*/

function doTerms()
{
window.open('/terms_and_conditions.html','terms','scrollbars=yes,width=600,height=400')
}

/* _________________________________________________________________________________________________________________________

Output the Footer
__________________________________________________________________________________________________________________________*/

function doFoot()
{
document.write('<P class="footline" align="center">');
document.write('&copy; 2008 Domino Commercial Interiors');
document.write(' | </SPAN> Tel: <SPAN TITLE="' + telePhone + '">' + telePhone + '</SPAN> | ');
document.write('<a href="/contact_domino_commercial_interiors.html">Contact us</A>');
document.write(' | ');
document.write('<a href="javascript:doTerms();">Terms</A>');
document.write(' | ');
document.write('<a href="/links.html">Links</A>');
document.write(' | ');
document.write('<a href="/index.html" TARGET="_top">Home</A></P>');
}



