<!--

function DateStamp() {

var d = new Array(

"Sunday",

"Monday",

"Tuesday",

"Wednesday",

"Thursday",

"Friday",

"Saturday"

);



var m = new Array(

"January",

"February",

"March",

"April",

"May",

"June",

"July",

"August",

"September",

"October",

"November",

"December"

);



var today = new Date();

var day = today.getDate();

var year = today.getYear();

if (year < 2000) year += 1900; 

document.write(d[today.getDay()]+" "+day+" "+m[today.getMonth()]+"  " + year);

//return d[today.getDay()]+", "+m[today.getMonth()]+" "+day+", " + year;

}



function TimeStamp() {

	var Stamp = new Date();

	var Hours;

	var Mins;

	var Time;

	Hours = Stamp.getHours();

	Mins = Stamp.getMinutes();

	if (Hours >= 12) Time = " p.m.";

		else Time = " a.m.";

	if (Hours > 12) Hours -= 12;

	if (Hours == 0) Hours = 12;

	if (Mins < 10) Mins = "0" + Mins;

	document.write(Hours + ":" + Mins + Time);

}

if (self != top)
    top.location.replace(self.location);

function frameJammer_hp(){
   var framedPage = location.search;
   if (framedPage.length > 1){
      framedPage = framedPage.substring(1);
      var theSplit = framedPage.indexOf('~');
      var thePage = framedPage.substring(0,theSplit);
      var theFrame = framedPage.substring(theSplit+1);
      eval("top."+ theFrame+".location.replace('"+ thePage+"')");
      }
   }

var agt = navigator.userAgent.toLowerCase();
var is_major = parseInt(navigator.appVersion);
var is_iemacdud = (agt.indexOf('msie')!=-1) && (agt.indexOf('mac')!=-1) && (is_major<4);
if (is_iemacdud) setTimeout('frameJammer_hp()',1500); 

var expDays = 1;

var page = "http://www.conservatoriesonline.com/brocreq4.htm";
var windowprops = "width=490,height=400,location=no,toolbar=no,menubar=no,scrollbars=yes,resizable=no";

function GetCookie (name) {  
var arg = name + "=";  
var alen = arg.length;  
var clen = document.cookie.length;  
var i = 0;  
while (i < clen) {    
var j = i + alen;    
if (document.cookie.substring(i, j) == arg)      
return getCookieVal (j);    
i = document.cookie.indexOf(" ", i) + 1;    
if (i == 0) break;   
}  
return null;
}
function SetCookie (name, value) {  
var argv = SetCookie.arguments;  
var argc = SetCookie.arguments.length;  
var expires = (argc > 2) ? argv[2] : null;  
var path = (argc > 3) ? argv[3] : null;  
var domain = (argc > 4) ? argv[4] : null;  
var secure = (argc > 5) ? argv[5] : false;  
document.cookie = name + "=" + escape (value) + 
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
((path == null) ? "" : ("; path=" + path)) +  
((domain == null) ? "" : ("; domain=" + domain)) +    
((secure == true) ? "; secure" : "");
}
function DeleteCookie (name) {  
var exp = new Date();  
exp.setTime (exp.getTime() - 1);  
var cval = GetCookie (name);  
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}
var exp = new Date(); 
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
function amt(){
var count = GetCookie('count')
if(count == null) {
SetCookie('count','1')
return 1
}
else {
var newcount = parseInt(count) + 1;
DeleteCookie('count')
SetCookie('count',newcount,exp)
return count
   }
}
function getCookieVal(offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}

function checkCount()
 {
var count = GetCookie('count')
if (count <1 )
{
count++;
SetCookie('count', count, exp);

window.open(page, "", windowprops);

}
else
{
count++;
SetCookie('count', count, exp);
   }
}

function formHandler(form){
var URL = document.form.supplier.options[document.form.supplier.selectedIndex].value;
window.location.href = URL;
}

function formqHandler(form){
var URL = document.form.question.options[document.form.question.selectedIndex].value;
window.location.href = URL;
}

function openlisting(winfile)
{
window.open (winfile,'','scrollbars=yes,width=450,height=450')
}

function opencaneimage(winfile)
{
window.open (winfile,'','scrollbars=no,width=450,height=370')
}

function MM_popupMsg(msg) { //v1.0
  alert(msg);
}

function openinvestor(winfile)
{
window.open (winfile,'','scrollbars=yes,width=600,height=400')
}

function opendisclaimer(winfile)
{
window.open (winfile,'','scrollbars=no,width=470,height=250')
}

function openprivacy(winfile)
{
window.open (winfile,'','scrollbars=yes,width=500,height=270')
}

function openedjor(winfile)
{
window.open (winfile,'','scrollbars=no,width=400,height=280')
}

function opencopyright(winfile)
{
window.open (winfile,'','scrollbars=no,width=400,height=235')
}

function openharm(winfile)
{
window.open (winfile,'','scrollbars=yes,width=515,height=450')
}

function openharm2(winfile)
{
window.open (winfile,'','scrollbars=yes,width=615,height=450')
}

function openglassex(winfile)
{
window.open (winfile,'','scrollbars=yes,width=450,height=400')
}

function opengallimg(winfile)
{
window.open (winfile,'','scrollbars=no,width=450,height=430')
}

function opengallimg2(winfile)
{
window.open (winfile,'','scrollbars=no,width=350,height=520')
}

function opengallimg3(winfile)
{
window.open (winfile,'','scrollbars=no,width=450,height=380')
}

function opengallimg4(winfile)
{
window.open (winfile,'','scrollbars=no,width=400,height=370')
}

function opengallimg5(winfile)
{
window.open (winfile,'','scrollbars=no,width=400,height=450')
}

function opengallimg6(winfile)
{
window.open (winfile,'','scrollbars=no,width=380,height=450')
}

function opengallimg7(winfile)
{
window.open (winfile,'','scrollbars=no,width=430,height=410')
}

function opengallimg8(winfile)
{
window.open (winfile,'','scrollbars=no,width=380,height=350')
}

function opengallimg9(winfile)
{
window.open (winfile,'','scrollbars=no,width=380,height=500')
}

function openform(winfile)
{
window.open (winfile,'','scrollbars=yes,width=500,height=460')
}

function openform2(winfile)
{
window.open (winfile,'','scrollbars=yes,width=550,height=500')
}

function openform3(winfile)
{
window.open (winfile,'','scrollbars=yes,width=670,height=500')
}

function openform4(winfile)
{
window.open (winfile,'','scrollbars=yes,width=720,height=400')
}
function openform5(winfile)
{
window.open (winfile,'','scrollbars=yes,width=450,height=500')
}

function opendetails(winfile)
{
window.open (winfile,'','scrollbars=yes,width=410,height=350')
}

function openadd(winfile)
{
window.open (winfile,'','scrollbars=no,width=515,height=250')
}

function openpool(winfile)
{
window.open (winfile,'','scrollbars=no,width=430,height=410')
}

function openpool2(winfile)
{
window.open (winfile,'','scrollbars=no,width=430,height=350')
}

function openspecial(winfile)
{
window.open (winfile,'','scrollbars=yes,width=590,height=580')
}

function open1(winfile)
{
window.open (winfile,'','scrollbars=no,width=350,height=500')
}

function open2(winfile)
{
window.open (winfile,'','scrollbars=no,width=430,height=355')
}

function openrequest(winfile)
{
window.open (winfile,'','scrollbars=yes,width=550,height=500')
}

function openrequest2(winfile)
{
window.open (winfile,'','scrollbars=yes,width=550,height=500')
}

function openqimage(winfile)
{
window.open (winfile,'','scrollbars=no,width=400,height=400')
}

function openextra(winfile) 
{ 
window.open (winfile,'','scrollbars=yes,width=500,height=400') 
}

function openpopup(winfile) 
{ 
window.open (winfile,'','scrollbars=no,width=270,height=400') 
}

function openpopup2(winfile) 
{ 
window.open (winfile,'','scrollbars=no,width=420,height=330') 
} 

function openpopup3(winfile) 
{ 
window.open (winfile,'','scrollbars=no,width=380,height=300') 
} 

function openpopup4(winfile) 
{ 
window.open (winfile,'','scrollbars=no,width=330,height=280') 
} 

function openpopup5(winfile) 
{ 
window.open (winfile,'','scrollbars=no,width=280,height=480') 
}

function opencabin(winfile)
{
window.open (winfile,'','scrollbars=no,width=320,height=440')
}

function openWindow1(winfile)
{
window.open (winfile,'','scrollbars=yes,width=630,height=400')
}

function openkimage(winfile)
{
window.open (winfile,'','scrollbars=no,width=400,height=300')
}

function openleaded(winfile)
{
window.open (winfile,'','scrollbars=yes,width=540,height=400')
}

function openhook(winfile)
{
window.open (winfile,'','scrollbars=no,width=190,height=450')
}

function openespag(winfile)
{
window.open (winfile,'','scrollbars=no,width=330,height=250')
}

function openq(winfile)
{
window.open (winfile,'','scrollbars=yes,width=550,height=430')
}

function openexpert(winfile)
{
window.open (winfile,'','scrollbars=no,width=280,height=470')
}

function openexpert2(winfile)
{
window.open (winfile,'','scrollbars=no,width=380,height=460')
}

function openimg(winfile)
{
window.open (winfile,'','scrollbars=no,width=380,height=450')
}

function openimg2(winfile)
{
window.open (winfile,'','scrollbars=no,width=380,height=320')
}

function openimg3(winfile)
{
window.open (winfile,'','scrollbars=no,width=400,height=380')
}

function openimg4(winfile)
{
window.open (winfile,'','scrollbars=no,width=350,height=320')
}

function openimg5(winfile)
{
window.open (winfile,'','scrollbars=no,width=320,height=430')
}

function openimg6(winfile)
{
window.open (winfile,'','scrollbars=no,width=320,height=380')
}

function openfeature(winfile)
{
window.open (winfile,'','scrollbars=no,width=450,height=360')
}
function openfeature2(winfile)
{
window.open (winfile,'','scrollbars=no,width=600,height=360')
}

function openoran(winfile)
{
window.open (winfile,'','scrollbars=no,width=450,height=440')
}

function openoran2(winfile)
{
window.open (winfile,'','scrollbars=no,width=350,height=520')
}

function openoran3(winfile)
{
window.open (winfile,'','scrollbars=no,width=450,height=400')
}

function openlinksdisclaimer(winfile)
{
window.open (winfile,'','scrollbars=no,width=450,height=170')
}

function opencoolsup(winfile)
{
window.open (winfile,'','scrollbars=no,width=530,height=460')
}

function opencoolpic(winfile)
{
window.open (winfile,'','scrollbars=no,width=530,height=400')
}

function opencoolpic2(winfile)
{
window.open (winfile,'','scrollbars=no,width=370,height=500')
}

function openconst(winfile)
{
window.open (winfile,'','scrollbars=no,width=480,height=510')
}

function openconst2(winfile)
{
window.open (winfile,'','scrollbars=no,width=480,height=510')
}

function openvacancy(winfile)
{
window.open (winfile,'','scrollbars=yes,width=550,height=570')
}

function openthanks(winfile)
{
window.open (winfile,'','scrollbars=no,width=200,height=100')
}

function opensurvey(winfile)
{
window.open (winfile,'','scrollbars=no,width=600,height=430')
}

function openoffer(winfile)
{
window.open (winfile,'','scrollbars=yes,width=550,height=500')
}

function opengproject(winfile)
{
window.open (winfile,'','scrollbars=no,width=450,height=400')
}

function opengproject2(winfile)
{
window.open (winfile,'','scrollbars=no,width=350,height=500')
}

function popup(Site)
{
window.open(Site, '',

'toolbar=no,statusbar=no,location=no,scrollbars=yes,resizable=nos,width=450,height=400')
}

function openland(winfile)
{
window.open (winfile,'','scrollbars=no,width=400,height=400')
}

function openport(winfile)
{
window.open (winfile,'','scrollbars=no,width=280,height=470')
}

function openport2(winfile)
{
window.open (winfile,'','scrollbars=no,width=370,height=450')
}

function opencavity(winfile)
{
window.open (winfile,'','scrollbars=yes,width=470,height=535')
}

function openimgq1(winfile)
{
window.open (winfile,'','scrollbars=no,width=300,height=500')
}

function openimgq2(winfile)
{
window.open (winfile,'','scrollbars=no,width=525,height=425')
}

function openimgq3(winfile)
{
window.open (winfile,'','scrollbars=no,width=525,height=400')
}

function openimgq4(winfile)
{
window.open (winfile,'','scrollbars=no,width=525,height=425')
}

function openimgq5(winfile)
{
window.open (winfile,'','scrollbars=no,width=400,height=350')
}

function openbox(winfile)
{
window.open (winfile,'','scrollbars=no,width=270,height=360')
}

function openpicWindow(winfile)
{
window.open (winfile,'','scrollbars=no,width=325,height=280')
}

function openpic2Window(winfile)
{
window.open (winfile,'','scrollbars=no,width=325,height=320')
}
function opencomgal(winfile)
{
window.open (winfile,'','scrollbars=no,width=500,height=450')
}

/* Zooming link script by Paul Anderson, copyright 2001 CNET Builder.com.
   May be freely used with attribution. Not for resale. All rights reserved. 
   Make a link zoom open by adding the event handler
   
   onclick="zoomBox(event,this);return false"
   
   To zoom into a new, positioned window add width, height, left, and top
   
   onclick="zoomBox(event,this,500,400,100,50);return false"
   */

var maxW,maxH,fromX,fromY,toX,toY,adjX,adjY,zBox,zStep=0,zLink,zNew;

function zoomBox(evt,zlink,maxw,maxh,tox,toy) {
if (arguments.length > 2) zNew=1;
scrollH=(window.pageYOffset!=null)?window.pageYOffset:document.body.scrollTop;
maxW=maxw?maxw:window.innerWidth?innerWidth:document.body.clientWidth;
maxH=maxh?maxh:window.innerHeight?innerHeight:document.body.clientHeight;
toX=tox?tox:0;
toY=(toy?toy:0)+scrollH;
fromX=evt.pageX?evt.pageX:evt.clientX;
fromY=(evt.pageY?evt.pageY:evt.clientY)+(document.all?scrollH:0);
adjX=toX+evt.screenX-fromX;
adjY=toY+evt.screenY-fromY;
if (document.createElement && document.body.appendChild && !zBox) {
	zBox=document.createElement("div");
	zBox.style.position="absolute";
	document.body.appendChild(zBox);
} else if (document.all && !zBox) {
	document.all[document.all.length-1].outerHTML+='<div id="zBoxDiv" style="position:absolute"></div>';
	zBox=document.all.zBoxDiv;
} else if (document.layers && !zBox) {
	zBox=new Layer(maxW);
	zBox.style=zBox;
	}
zLink=zlink;
doZoom();
}

function doZoom() {
zStep+=1;
zPct=(10-zStep)/10
if (document.layers) {
	zBox.moveTo(toX+zPct*(fromX-toX),toY+zPct*(fromY-toY));
	zBox.document.open();
	zBox.document.write("<table width='"+maxW*(1-zPct)+"' height="+maxH*(1-zPct)+" border=2 cellspacing=0><tr><td></td></tr></table>");
	zBox.document.close();
	} else {
	zBox.style.border="2px solid #999999";
	zBox.style.left=toX+zPct*(fromX-toX);
	zBox.style.top=toY+zPct*(fromY-toY);
	zBox.style.width=maxW*(1-zPct);
	zBox.style.height=maxH*(1-zPct);
	}
zBox.style.visibility="visible";
if (zStep < 10) setTimeout("doZoom("+fromX+","+fromY+","+toX+","+toY+")",30);
else {
	zBox.style.visibility='hidden';
	zStep=0;
	if (zLink && !zNew) location.href=zLink.href;
	else if (zLink && zNew) {
		var w=window.open(zLink.href,'','width='+maxW+',height='+maxH+',left='+adjX+',top='+adjY+',scrollbars,resizable');
		zNew=null;
		}
	}
}

function PopupPic(sPicURL) { 
window.open( "popup.htm?"+sPicURL, "","resizable=1,HEIGHT=200,WIDTH=300"); 
} 
function CalculateTotal(frm) {
    var order_total = 0

    // Run through all the form fields
    for (var i=0; i < frm.elements.length; ++i) {

        // Get the current field
        form_field = frm.elements[i]

        // Get the field's name
        form_name = form_field.name

        // Is it a "product" field?
        if (form_name.substring(0,4) == "PROD") {

            // If so, extract the price from the name
            item_price = parseFloat(form_name.substring(form_name.lastIndexOf("_") + 1))

            // Get the quantity
            item_quantity = parseInt(form_field.value)

            // Update the order total
            if (item_quantity >= 0) {
                order_total += item_quantity * item_price
            }
        }
    }

    // Display the total rounded to two decimal places
    frm.TOTAL.value = round_decimals(order_total, 2)
}

function round_decimals(original_number, decimals) {
    var result1 = original_number * Math.pow(10, decimals)
    var result2 = Math.round(result1)
    var result3 = result2 / Math.pow(10, decimals)
    return pad_with_zeros(result3, decimals)
}

function pad_with_zeros(rounded_value, decimal_places) {

    // Convert the number to a string
    var value_string = rounded_value.toString()
    
    // Locate the decimal point
    var decimal_location = value_string.indexOf(".")

    // Is there a decimal point?
    if (decimal_location == -1) {
        
        // If no, then all decimal places will be padded with 0s
        decimal_part_length = 0
        
        // If decimal_places is greater than zero, tack on a decimal point
        value_string += decimal_places > 0 ? "." : ""
    }
    else {

        // If yes, then only the extra decimal places will be padded with 0s
        decimal_part_length = value_string.length - decimal_location - 1
    }
    
    // Calculate the number of decimal places that need to be padded with 0s
    var pad_total = decimal_places - decimal_part_length
    
    if (pad_total > 0) {
        
        // Pad the string with 0s
        for (var counter = 1; counter <= pad_total; counter++) 
            value_string += "0"
        }
    return value_string
}
function emailcheck(cur)
{
var string1=cur.email.value
if (string1.indexOf("@")==-1)
{
alert("Please input a valid email address!")
return false
}
}

-->
