<!-- hide this stuff from other browsers 


function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);



// layer on.
function show() {
    // shows mulitple layers
    // does not work in NS4 with nested layers
    var args = show.arguments;
    for (var i=0; i<(args.length); i++) {
		if (document.getElementById) { 		// IE5, NS6
			if (document.getElementById(args[i])) document.getElementById(args[i]).style.visibility = 'visible';
		} else if (document.all) { 			// IE4
            if (document.all[args[i]]) document.all[args[i]].style.visibility = 'visible';
        } else if (document.layers) {		// NS4
            if (document.layers[args[i]]) document.layers[args[i]].visibility = 'visible';
        }
    }
}

// layer off.
function hide() {
    // hides mulitple layers
    // does not work in NS4 with nested layers
    var args = hide.arguments;
    for (var i=0; i<(args.length); i++) {
		if (document.getElementById) { 		// IE5, NS6
			if (document.getElementById(args[i])) document.getElementById(args[i]).style.visibility = 'hidden';
		} else if (document.all) { 			// IE4
            if (document.all[args[i]]) document.all[args[i]].style.visibility = 'hidden';
        } else if (document.layers) {		// NS4
            if (document.layers[args[i]]) document.layers[args[i]].visibility = 'hidden';
        }
    }
}

// toggle layer
if (document.layers) {
  var hidden = "hide";
  var visible = "show";
} else {
  var hidden = "hidden";
  var visible = "visible";
}
var toggle = "toggle";

function changeVis() {
  if (document.layers || document.all) {
    var inc, endInc=arguments.length;
    // run through the args (objects) and set the visibility of each
    for (inc=0; inc<endInc; inc+=2) {
      // get a good object reference
      var daObj = WM_checkIn(arguments[inc]);
      if (arguments[inc+1] == hidden) {
        // hide the object
        daObj.visibility = hidden;
      } else if (arguments[inc+1] == visible) {
        // show the object
        daObj.visibility = visible;
      } else if (arguments[inc+1] == toggle) {
        // toggle the object's visibility
        if (daObj.visibility == visible) {
          daObj.visibility = hidden;
        } else if (daObj.visibility == hidden) {
          daObj.visibility = visible;
        }
      }
    }
  }
}


//selected item.

var itemSelected = "";
var divSelected = "";

function setSelected(imageName,layerName) 
{
	if (itemSelected != ""){	
		if (imageName != itemSelected){
				if (document.layers && layerName != "") {
  				eval('document.' + divSelected + '.document.' + itemSelected + '.src = ' + itemSelected + 'off.src')
				}
				else {
  				eval('document.' + itemSelected + '.src = ' + itemSelected + 'off.src')
    		}
		}
	}
	itemSelected = imageName;
	divSelected = layerName;
}



//image on.
function turnOn(imageName,layerName) {
	if (document.layers && layerName != "") {
  		eval('document.' + layerName + '.document.' + imageName + '.src = ' + imageName + 'on.src')
	}
	else {
  		eval('document.' + imageName + '.src = ' + imageName + 'on.src')
		//alert(eval('document.' + imageName + '.src = ' + imageName + 'on.src'));
    }
}



//image off.
function turnOff(imageName,layerName) {
	if (imageName != itemSelected){
	if (document.layers && layerName != "") {
	// declare layer for netscape.	
  		eval('document.' + layerName + '.document.' + imageName + '.src = ' + imageName + 'off.src');
	}
 	else {
		eval('document.' + imageName + '.src = ' + imageName + 'off.src');
		//alert(eval('document.' + imageName + '.src = ' + imageName + 'off.src'));
    }
	}
}


//open popup
function OpenBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

//Go to URL
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}


//load form selection onChange.
function load(formName) {
	var list = document[formName].list;
	var str = list.options[list.selectedIndex].value;
	if (str != "") window.location.href = str;
}


// This function checks for DOM strategy, then returns an object reference.
function WM_checkIn(id) {

  if (document.all) {
    return document.all[id].style;
  } else if(document.layers) {
    return document.layers[id];
  }
}

// submits forms
function submitForm(formName,layerName) {


//NS 4x

if (document.layers && layerName != "") {
  		eval('document.' + layerName + '.document.' + formName + '.submit()')
	}
	else {
  		eval('document.' + formName + '.submit()')
    }
}

function submitParentForm(formName,layerName) {


//NS 4x

if (document.layers && layerName != "") {
  		eval('window.opener.document.' + layerName + '.document.' + formName + '.submit()')
	}
	else {
  		eval('window.opener.document.' + formName + '.submit()')
    }
}

// this script handles the Netscape 4 bug on CSS layers.
if(document.layers){origWidth=innerWidth;origHeight=innerHeight;onresize=function(){ 
if(innerWidth!=origWidth||innerHeight!=origHeight)location.reload()}} 

<!-- Move this to .js file when ready -->

<!--


function getElementLeft(Elem) {

		var elem;
		if(document.getElementById) {
			var elem = document.getElementById(Elem);
		} else if (document.all){
			var elem = document.all[Elem];
		}
		xPos = elem.offsetLeft;
		tempEl = elem.offsetParent;
  		while (tempEl != null) {
  			xPos += tempEl.offsetLeft;
	  		tempEl = tempEl.offsetParent;
  		}
		return xPos;
}


function getElementTop(Elem) {

		if(document.getElementById) {	
			var elem = document.getElementById(Elem);
		} else if (document.all) {
			var elem = document.all[Elem];
		}
		yPos = elem.offsetTop;
		tempEl = elem.offsetParent;
		while (tempEl != null) {
  			yPos += tempEl.offsetTop;
	  		tempEl = tempEl.offsetParent;
  		}
		return yPos;
}


// layer On.
function showPopup(buttonName,popupName) {
		//Get the co-ords of the button
		var x = getElementLeft(buttonName);
		var y = getElementTop(buttonName);
		// Add a bit
		x -= 50;
		y -= + 150;
		// Move and Show the popup
		document.getElementById(popupName).style.left = x;
		document.getElementById(popupName).style.top = y;		
		document.getElementById(popupName).style.visibility = 'visible';
		//Show the clearpopup layer
		document.getElementById('clearpopup').style.visibility = 'visible';		
}

// layer Off.
function hidePopup(popupName) {
	document.getElementById(popupName).style.visibility = 'hidden';
    //Hide the clearpopup layer
    document.getElementById('clearpopup').style.visibility = 'hidden';	
}


//-->

function changeImage(selectedColour,more_link, handset_id, counter){
    //alert('in here');
    if(selectedColour.length >0){
        if(window.XMLHttpRequest){
            req = new XMLHttpRequest();
        }
        else if(window.ActiveXObject){
            req = new ActiveXObject("Microsoft.XMLHTTP");
        } 
        //alert(more_link); 
        //inc_handsetColour.cfm
        if(more_link.length >0){
            req.open("GET.html", more_link + "&colour&col=" + selectedColour + "&handset_id=" + handset_id ,false);
        }
        else{
            req.open("GET.html","index37dc.html?colour&amp;col=" + selectedColour + "&handset_id=" + handset_id,false);
        }
        //alert(selectedColour + more_link+ " " + handset_id); 
        req.send(null); 
        //  alert(more_link + '&colour&col=' + selectedColour + '&handset_id=' + handset_id );
        //var temp = eval("document.getElementById('handset_image_" + handset_id + "')");
                    //var image_div = temp.innerHTML;
                   // alert(image_div);
                   //temp.innerHTML = "123";
                   // alert(image_div);
        // gives the request object an event handler 
        //req.onreadystatechange = function() { 
            //alert('abc');
            //alert(req.readyState + req.status);
            if ((req.readyState == 4) /*&& (req.status == 200)*/) {
               // alert('def'); 
                // creates an array from returned list 
                var new_image = trim(req.responseText);
                //alert(new_image);
                if (new_image.length) {
                    var image_div = eval("document.getElementById('handset_image_" + counter + "')");
                    image_div.innerHTML = new_image;
                }
            //}
        }
    }       
    return;
}

function changePlanImage(selectedColour,more_link, subplan_id, counter){
    //alert('in here');
    if(selectedColour.length >0){
        if(window.XMLHttpRequest){
            req = new XMLHttpRequest();
        }
        else if(window.ActiveXObject){
            req = new ActiveXObject("Microsoft.XMLHTTP");
        } 
        //alert(more_link); inc_handsetColour.cfm
        if(more_link.length >0){
            req.open("GET.html", more_link + "&colour&col=" + selectedColour + "&subplan_id" + subplan_id + "&fromPage=" + fromPage,false);
        }
        else{
            req.open("GET.html","index37dc.html?colour&amp;col=" + selectedColour + "&subplan_id" + subplan_id+ "&fromPage=" + fromPage,false);
        }
        //alert(selectedColour + more_link+ " " + handset_id); 
        req.send(null); 
         // alert('2');
        //var temp = eval("document.getElementById('handset_image_" + handset_id + "')");
                    //var image_div = temp.innerHTML;
                   // alert(image_div);
                   //temp.innerHTML = "123";
                   // alert(image_div);
        // gives the request object an event handler 
        //req.onreadystatechange = function() { 
            //alert('abc');
            //alert(req.readyState + req.status);
            if ((req.readyState == 4) /*&& (req.status == 200)*/) {
               // alert('def'); 
                // creates an array from returned list 
                var new_image = req.responseText;
                //alert(new_image);
                if (new_image.length) {
                    var image_div = eval("document.getElementById('handset_image_" + counter + "')");
                    image_div.innerHTML = new_image;
                }
            //}
        }
    }       
    return;
}

function changeLargeImage(selectedColour,type, altText, handset_id){
    //alert('in here');
    if(selectedColour.length >0){
        if(window.XMLHttpRequest){
            req = new XMLHttpRequest();
        }
        else if(window.ActiveXObject){
            req = new ActiveXObject("Microsoft.XMLHTTP");
        } 
        //alert(more_link); inc_handsetColour.cfm
        req.open("GET.html", "indexd432.html?colour&amp;type=1" + type + "&col=" + selectedColour + "&alt=" + altText,false);
        //alert(selectedColour + more_link+ " " + handset_id); 
        req.send(null); 
        // gives the request object an event handler 
        //req.onreadystatechange = function() { 
            //alert('abc');
            //alert(req.readyState + req.status);
            if ((req.readyState == 4) /*&& (req.status == 200)*/) {
               // alert('def'); 
                // creates an array from returned list 
                var new_image = req.responseText;
                //alert(new_image);
                if (new_image.length) {
                    var image_div = eval("document.getElementById('handset_image_" + handset_id + "')");
                    image_div.innerHTML = new_image;
                }
            //}
        }
    }       
    return;
}

function preloadImages(thispage, table_version,counter){
        //alert(counter);
        if(window.XMLHttpRequest){
            req = new XMLHttpRequest();
        }
        else if(window.ActiveXObject){
            req = new ActiveXObject("Microsoft.XMLHTTP");
        } 
        //alert(more_link); inc_handsetColour.cfm
        for(var i = 1; i<counter;i++){
            /*if(eval("document.getElementById('select_colour_id_" + i + "')") != null && eval("document.getElementById('select_colour_id_" + i + "')")!=""){
                //alert(i + " " + eval("document.getElementById('select_colour_id_" + i + "').value"));
            } 
            else{
                alert('not defined');
            }*/
            //alert('handset_id' + eval("document.getElementById('handset_" + i + "').value"));
             if(eval("document.getElementById('select_colour_id_" + i + "')") != null){
                req.open("GET.html", "index56bc.html?colour&amp;preload=1&amp;thispage=" + thispage + "&table_version=" + table_version + "&counter=" +i + "&handset_id=" + eval("document.getElementById('handset_" + i + "').value") + "&col=" + eval("document.getElementById('select_colour_id_" + i + "').value") ,false);
            }
            else{
                req.open("GET.html", "index56bc.html?colour&amp;preload=1&amp;thispage=" + thispage + "&table_version=" + table_version + "&counter=" +i + "&handset_id" + eval("document.getElementById('handset_" + i + "').value") ,false);
            }
            
            req.send(null); 
            // gives the request object an event handler 
            //req.onreadystatechange = function() { 
                //alert('abc');
                //alert(req.readyState + req.status);
                if ((req.readyState == 4) /*&& (req.status == 200)*/) {
                   // alert('def'); 
                    // creates an array from returned list 
                    var new_image = trim(req.responseText);
                   //alert(new_image);
                    if (new_image.length) {
                        var image_div = eval("document.getElementById('handset_image_" + i + "')");
                        image_div.innerHTML = new_image;
                    }
                }
          }    
    return;
}

function preloadPlanImages(subplan_id, table_version,counter, fromPage){
    //alert('in here');
        if(window.XMLHttpRequest){
            req = new XMLHttpRequest();
        }
        else if(window.ActiveXObject){
            req = new ActiveXObject("Microsoft.XMLHTTP");
        } 
        //alert(more_link); inc_handsetColour.cfm
        for(var i = 1; i<counter;i++){
            /*if(eval("document.getElementById('select_colour_id_" + i + "')") != null && eval("document.getElementById('select_colour_id_" + i + "')")!=""){
                //alert(i + " " + eval("document.getElementById('select_colour_id_" + i + "').value"));
            } 
            else{
                alert('not definedd');
            }*/
            
			if (eval("document.getElementById('select_colour_id_" + i + "')") != null){
                req.open("GET.html", "index11d2.html?colour&amp;preload=1&amp;subplan_id=" + subplan_id + "&table_version=" + table_version + "&counter=" +i + "&handset_id=" + eval("document.getElementById('handset_" + i + "').value") +  "&col=" + eval("document.getElementById('select_colour_id_" + i + "').value")+ "&fromPage=plan"  ,false);
            } else {
                req.open("GET.html", "index11d2.html?colour&amp;preload=1&amp;subplan_id=" + subplan_id + "&table_version=" + table_version + "&counter=" +i + "&fromPage=" + fromPage ,false);
            }
            
            req.send(null); 
            // gives the request object an event handler 
            //req.onreadystatechange = function() { 
                //alert('abc');
                //alert(req.readyState + req.status);
                if ((req.readyState == 4) /*&& (req.status == 200)*/) {
                   // alert('def'); 
                    // creates an array from returned list 
                    var new_image = trim(req.responseText);
                   // alert(new_image);
                    if (new_image.length) {
                        var image_div = eval("document.getElementById('handset_image_" + i + "')");
						
						if (image_div != null) {
							image_div.innerHTML = new_image;
						}
                    }
                }
          }    
    return;
}
function trim(str)
{
   return str.replace(/^\s*|\s*$/g,"");
}

function isOnline(selectedColour, refPoint, name){
    //alert('in here');
    if(selectedColour.length >0){
        if(window.XMLHttpRequest){
            req = new XMLHttpRequest();
        }
        else if(window.ActiveXObject){
            req = new ActiveXObject("Microsoft.XMLHTTP");
        } 
        //alert(more_link);
        req.open("GET.html", "indexd1ba.html?colour&amp;popup=1" + "&col=" + selectedColour, false);
        //alert(selectedColour + more_link+ " " + handset_id); 
        req.send(null); 
        // gives the request object an event handler 
        //req.onreadystatechange = function() { 
            //alert('abc');
            //alert(req.readyState + req.status);
            if ((req.readyState == 4) /*&& (req.status == 200)*/) {
               // alert('def'); 
                // creates an array from returned list 
                var isOnline = trim(req.responseText);
                if(isOnline == "0"){
                    showPopup(refPoint, name);
                }
                
            //}
        }
    }       
    return;
}
function showElement(element_id){
    document.getElementById(element_id).style.display='';
}
function hideElement(element_id){
    document.getElementById(element_id).style.display='none';
}
function toggleClass(element_id, new_class){
    document.getElementById(element_id).className = new_class;
}
function setValue(element_id, value){
    document.getElementById(element_id).value = value;
}
function emailpopup(){
                
    var eurl = location.href;
    window.open('emailpage.jsp?eurl='+eurl,'contentwin','toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=500,left = 262,top = 100');
}


// end hiding javascript -->