var da  = (document.all) ? 1 : 0;
var pr  = (window.print) ? 1 : 0;
var mac = (navigator.userAgent.indexOf("Mac") != -1);

var bookmarktitle = document.title;

function addfav(){
   var bookmarkurl = 'http://www.Yoursite.com/default.asp?BMID=' + parent.frames[2].document.all.xDocID.value;
	if (document.all) window.external.AddFavorite(bookmarkurl,bookmarktitle);
}

function ViewNode( xID )
{
		location.href = '../../../go.asp?docId=' + xID;
}

function Home(){
		document.location.href = '../../../default.asp';
}

function RecomendPage(){
		window.open("../../Scripts/old/RecomendPage.asp","NewWindow","scrollbars=NO,width=450,height=370")
	}

function SearchSite(){
		window.open('../../Scripts/old/SiteSearch.asp',"NewWindow","scrollbars=YES,width=450,height=370");
}

function SiteMap(){
		window.open('../../Scripts/old/SiteMap.asp',"NewWindow","scrollbars=YES,width=450,height=370");
}

function printThis() {
  if (pr) { // NS4, IE5
    window.print();
  } else if (da && !mac) { // IE4 (Windows)
    vbPrintPage();
  } else { // other browsers
    alert("Sorry, your browser doesn't support this feature.");
  }
}


if (da && !pr && !mac) with (document) {
  writeln('<OBJECT ID="WB" WIDTH="0" HEIGHT="0" CLASSID="clsid:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>');
  writeln('<' + 'SCRIPT LANGUAGE="VBScript">');
  writeln('Sub window_onunload');
  writeln('  On Error Resume Next');
  writeln('  Set WB = nothing');
  writeln('End Sub');
  writeln('Sub vbPrintPage');
  writeln('  OLECMDID_PRINT = 6');
  writeln('  OLECMDEXECOPT_DONTPROMPTUSER = 2');
  writeln('  OLECMDEXECOPT_PROMPTUSER = 1');
  writeln('  On Error Resume Next');
  writeln('  WB.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER');
  writeln('End Sub');
  writeln('<' + '/SCRIPT>');
}

function openPopup(url, height, width, name, parms) {
   var left = Math.floor( (screen.width - width) / 2);
   var top = Math.floor( (screen.height - height) / 2);
   var winParms = "top=" + top + ",left=" + left + ",height=" + height + ",width=" + width;
   if (parms) { winParms += "," + parms; }
   var win = window.open(url, name, winParms);
   if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
   //return win;
}

function getNode( xID )
{
		return '../../../go.asp?docId=' + xID;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


function MM_start() {
	MM_preloadImages('../mediaarchive/images/nav-about2.gif','../mediaarchive/images/nav-prod2.gif','../mediaarchive/images/nac-clrcrd2.gif','../mediaarchive/images/nav-tips2.gif','../mediaarchive/images/nav-where2.gif','../mediaarchive/images/nav-ctc2.gif','../mediaarchive/images/nav-home2.gif');
}

function MM_menu() {

	document.write('<img src="../mediaarchive/images/spacer.gif" width="15" height="49" border="0"><a href="javascript:ViewNode(305)" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Home\',\'\',\'../mediaarchive/images/nav-home2.gif\',1)"><img src="../mediaarchive/images/nav-home.gif" alt="Colourplus Home Page" name="Home" width="48" height="49" border="0"></a><a href="javascript:ViewNode(307)" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'About\',\'\',\'../mediaarchive/images/nav-about2.gif\',1)"><img src="../mediaarchive/images/nav-about.gif" alt="About Us" name="About" width="75" height="49" border="0"></a><a href="javascript:ViewNode(392)" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Products\',\'\',\'../mediaarchive/images/nav-prod2.gif\',1)"><img src="../mediaarchive/images/nav-prod.gif" alt="Products" name="Products" width="76" height="49" border="0"></a><a href="javascript:ViewNode(350)" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Colourcard\',\'\',\'../mediaarchive/images/nac-clrcrd2.gif\',1)"><img src="../mediaarchive/images/nac-clrcrd.gif" alt="Colourcard" name="Colourcard" width="90" height="49" border="0"></a><a href="javascript:ViewNode(310)" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Tips\',\'\',\'../mediaarchive/images/nav-tips2.gif\',1)"><img src="../mediaarchive/images/nav-tips.gif" alt="Tips and Advice" name="Tips" width="94" height="49" border="0"></a><a href="javascript:ViewNode(311)" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Where\',\'\',\'../mediaarchive/images/nav-where2.gif\',1)"><img src="../mediaarchive/images/nav-where.gif" alt="Where We Are" name="Where" width="97" height="49" border="0"></a><a href="javascript:ViewNode(312)" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Contact\',\'\',\'../mediaarchive/images/nav-ctc2.gif\',1)"><img src="../mediaarchive/images/nav-ctc.gif" alt="Contact Us" name="Contact" width="82" height="49" border="0"></a>');

}

function MM_footer() {

	document.write('<table width="100%"  border="0" cellspacing="0" cellpadding="0"><tr><td height="20" align="center"><img src="../mediaarchive/images/spacer.gif" width="20" height="20"></td></tr><tr><td height="1" align="center"><table width="749" border="0" cellspacing="0" cellpadding="0">  <tr bgcolor="#FF9B10"><td bgcolor="#002f49"><img src="../mediaarchive/images/spacer.gif" width="549" height="1"></td><td width="200" bgcolor="#002f49"><img src="../mediaarchive/images/spacer.gif" width="200" height="1"></td></tr><tr bgcolor="#002f49"><td><img src="../mediaarchive/images/spacer.gif" width="549" height="47"></td><td width="200" align="right" bgcolor="#002f49"><span class="copyright">&copy; 2010 Colourplus&nbsp;</span>&nbsp; </td></tr></table></td></tr></table>');

}

