<!--



function Monify(value)

{

  var str = "" + Math.round(value*100)

  var len = str.length

  return (str=="0")?"0.00":(str.substring(0,len-2)+"."+str.substring(len-2,len))

}





function WM_acceptsCookies() {



  var answer

  document.cookie = 'WM_acceptsCookies=yes'

  if(document.cookie == '') answer = false; else answer = true

  document.cookie = 'WM_acceptsCookies=yes; expires=Fri, 13-Apr-1970 00:00:00 GMT'

  return answer

}



function WM_setCookie (name, value) {

     var now = new Date();

     fixDate(now);

     now.setTime(now.getTime() + 2 * 60 * 60 * 1000);

  	setCookie(name, value, now,"/");

}


function setCookie(name, value, expires, path, domain, secure) {

       var curCookie = name + "=" + escape(value) +

           ((expires) ? "; expires=" + expires.toGMTString() : "") +

           ((path) ? "; path=" + path : "") +

           ((domain) ? "; domain=" + domain : "") +

           ((secure) ? "; secure" : "");
           
     document.cookie = curCookie;

     }


 function fixDate(date) {

       var base = new Date(0);

       var skew = base.getTime();

       if (skew > 0)

         date.setTime(date.getTime() - skew);

     }



     var now = new Date();

     fixDate(now);

     now.setTime(now.getTime() + 30 * 24 * 60 * 60 * 1000);



function WM_readCookie(name) {

  if(document.cookie == '') return false 

  else return unescape(WM_getCookieValue(name))

}



function WM_getCookieValue(name) {



  var firstChar, lastChar, endOfName

  var theBigCookie = document.cookie

  firstChar = theBigCookie.indexOf(name)

  if((firstChar != -1) && (theBigCookie.charAt(firstChar + name.length) == '=')) {

    firstChar += name.length + 1

    lastChar = theBigCookie.indexOf(';', firstChar)

    if(lastChar == -1) lastChar = theBigCookie.length

    return theBigCookie.substring(firstChar, lastChar)

  } else {

    return false

  }

}




function checkout(term){

	var wth="/docs/" +term +".htm";

var ritafairclough=window.open(wth,'cashup', 'width=280,height=400','toolbar=no,scrollbars=no');

}



function testit(){

	swidth="width";

	sheight="height";

	iwidth="The window width for this style of window must be greater than "+ (parseFloat(window.document.details.min_width.value)*100)+"cm, and less than "+ (parseFloat(window.document.details.max_width.value)*100)+"cm";

	iheight="The window height for this style of window must be greater than "+ (parseFloat(window.document.details.min_height.value)*100)+"cm, and less than "+ (parseFloat(window.document.details.max_height.value)*100)+"cm";

	iarea="Sorry, you need to select a different style of window to achieve your given dimensions";

	if(iswithinbounds('width')&&iswithinbounds('height')) checkarea();

		

}



function iswithinbounds(dimension){



	var bmin=eval("window.document.details.min_"+dimension+".value");

	var bmax=eval("window.document.details.max_"+dimension+".value");

	var c=(eval("window.document.details."+dimension+".value"))/100;

	var d=(eval('i'+dimension))

	if((c>=bmin)&&(c<=bmax)) return (true);

	else alert(d);return (false);	

		}



function calculate(){


	window.document.details.uid.value=WM_readCookie('uid');

	window.document.details.submit();



}



function checkarea(){

	

	var maxarea=parseFloat(window.document.details.max_area.value);

	x=(window.document.details.width.value)/100;

	y=(window.document.details.height.value)/100;

	thisbig=(x*y)

	if (thisbig<maxarea) calculate();

	else alert(iarea); return(false);

	}







function WM_killCookie(name) {

  var theValue = WM_getCookieValue(name);

  if(theValue) {

    document.cookie = name + '=' + theValue + '; expires=Fri, 13-Apr-1970 00:00:00 GMT';

  }

}

               bName = navigator.appName;
bVer = parseInt(navigator.appVersion);
    if ((bName == "Netscape" && bVer >= 3) || 
        (bName == "Microsoft Internet Explorer" && bVer >= 3)) br = "n3"; 
    else br = "n2";



 if (br== "n9") { 
    img1on = new Image();                       
    img1on.src = "/c_pics/yeson.gif";                
    img2on = new Image();                        
    img2on.src = "/c_pics/noon.gif";              
    img3on = new Image();                        
    img3on.src = "/c_pics/neveron.gif";    



    img1off = new Image();                       
    img1off.src = "/c_pics/yesoff.gif";                 
    img2off = new Image();                      
    img2off.src = "/c_pics/nooff.gif";              
    img3off = new Image();                      
    img3off.src = "/c_pics/neveroff.gif";  
    }



function imgAct(imgName) {
    if (br == "n9") {
    document[imgName].src = eval(imgName + "on.src");
    }
}


function imgInact(imgName) {
    if (br == "n9") {
    document[imgName].src = eval(imgName + "off.src");


    }
}


// -->

