function pop(url, name) {
  link = window.open(url,name,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=640,height=550,left=25,top=25");
}
         function askcolorgroups() {
        var http = new HTTPRequest();
        var requestvars = "";
        requestvars = "?region=" + region
        			+ "&language=" + language
        			+ "&displayurl=" + ServerRelativeSiteRoot + "SunguardProducts/ProductsbyAppearance/index.htm"
        			+ "&arrowurl=" + RelativeWebRoot + "groups/sunguard/documents/web_content/gi_002350.gif"
        			+ "&jspurl=" + RelativeWebRoot + "groups/jspsunguardadmin/documents/web_assets/gi_003184.jsp"
        			+ "&imageurl=" + RelativeWebRoot + "groups/jsp/documents/web_content/gi_002427.jsp"
        			+ "&image2url=" + RelativeWebRoot + "groups/jsp/documents/web_content/gi_002445.jsp";
                    requestvars = requestvars + "&ct=" + SSContributor;
                    requestvars = requestvars + "&siteid=" + SiteId;
        http.open("GET", RelativeWebRoot + "groups/jsp/documents/web_content/gi_002426.jsp" + requestvars, true);
        http.onreadystatechange = function (){ handleHttpResponsecolorgroup(http)};
        http.send(null);
        }
        function handleHttpResponsecolorgroup(http) {
        if (http.readyState == 4) {
        result = http.responseText;
        var projectfeaturedlist = document.getElementById("colorfamily");
        projectfeaturedlist.innerHTML = result;
        }           
        }
         function appearancebycolorgroupsubmit(color) {
         	//radiovalue = document.getElementById("constructiontype").value;
			var requestvars = "?color=" + color;// + "&constructiontype=" + radiovalue;
			newlocation = ServerRelativeSiteRoot + "SunguardProducts/ProductsbyAppearance/AppearanceSelector/index.htm" + requestvars;
			location.href=newlocation;
        }
         function askproductsbycolorgroup(color, sort) {
        var http = new HTTPRequest();
        var requestvars = "";
        requestvars = "?region=" + region
        			+ "&language=" + language
			        + "&siteid=" + SiteId
        			+ "&colorgroup=" + color
			        + "&serverroot=" + ServerRelativeSiteRoot
			        + "&webroot=" + RelativeWebRoot
//        			+ "&sampleurl=" + RelativeWebRoot + "groups/sunguard/documents/web_content/gi_002350.gif"
//        			+ "&projectdatabaseurl=" + RelativeWebRoot + "groups/sunguard/documents/web_content/gi_002350.gif"
//        			+ "&productdetailurl=" + RelativeWebRoot + "groups/sunguard/documents/web_content/gi_002350.gif"
        			+ "&displayurl=" + ServerRelativeSiteRoot + "SunguardProducts/ProductsbyAppearance/AppearanceSelector/index.htm"
        			+ "&jspurl=" + RelativeWebRoot + "groups/jspsunguardadmin/documents/web_assets/gi_003184.jsp"
        			+ "&imageurl=" + RelativeWebRoot + "groups/jsp/documents/web_content/gi_002864.jsp"
        			+ "&sort=" + sort
        			+ "&image2url=" + RelativeWebRoot + "groups/jsp/documents/web_content/gi_002445.jsp";
                    requestvars = requestvars + "&ct=" + SSContributor;
        http.open("GET", "" + RelativeWebRoot + "groups/jsp/documents/web_content/gi_002430.jsp" + requestvars, true);
        http.onreadystatechange = function (){ handleHttpResponseproductsbycolorgroup(http)};
        http.send(null);
        }
        function handleHttpResponseproductsbycolorgroup(http) {
        if (http.readyState == 4) {
        result = http.responseText;
        var projectfeaturedlist = document.getElementById("colorfamily");
        projectfeaturedlist.innerHTML = result;
        }           
        }
         function appearancesubmit(productid, coatingid) {
        	//radiovalue = document.getElementById("constructiontype").value;
			var requestvars = "?id=" + productid + "&coatingid=" + coatingid;// + "&constructiontype=" + radiovalue;
			location.href=ServerRelativeSiteRoot + "SunguardProducts/ProductsbyAppearance/AppearanceSelector/Results/index.htm" + requestvars;
        }
        function getPerformanceDataComparison() {
        var http = new HTTPRequest();
        var theForm = document.getElementById('appearance');


		var selprods="";
		for(var i=0; i < theForm.selectedproducts.length; i++){
			if(theForm.selectedproducts[i].checked || whichPressed == "compareall") {
				if(selprods.length == 0) {
					selprods = theForm.selectedproducts[i].value;
				} else {
					selprods +="," + theForm.selectedproducts[i].value;
				}
			}
		}

        
        var requestvars = ""
        + "?selectedproducts=" + selprods;

        window.location = ServerRelativeSiteRoot + "SunguardProducts/PerformanceComparisonTool/index.htm" + requestvars;
		return false;
        }

function buildProductDetailillustration(){

			var surface1value = document.getElementById("Surface1").value;
			var surface2value = document.getElementById("Surface2").value; 
			var osvalue = document.getElementById("substrateselect1").value;
			var oslvalue = document.getElementById("substrateselect2").value;
			var isvalue = document.getElementById("substrateselect3").value;
			var islvalue = document.getElementById("substrateselect4").value;
			var illstring1 = "";
			var illstring = "";
			var substrateimage = "<img src=\"" + RelativeWebRoot + "groups/sunguard/documents/web_content/gi_002879.gif\">";
			var coatingimage = "<img src=\"" + RelativeWebRoot + "groups/sunguard/documents/web_content/gi_002877.gif\">";
			var lamiimage = "<img src=\"" + RelativeWebRoot + "groups/sunguard/documents/web_content/gi_002878.gif\">";
			var igimage = "<img src=\"" + RelativeWebRoot + "groups/sunguard/documents/web_content/gi_002876.gif\">";
			if(surface1value == "1" || surface2value == "1" )
				illstring += coatingimage;
			illstring += substrateimage;
			illstring1 += "1 2";
			if(surface1value == "2" || surface2value == "2" )
				illstring += coatingimage;
			if(oslvalue != "" && oslvalue != "null") {//lami
				illstring += lamiimage;
				illstring1 += "&nbsp;";
				if(surface1value == "3" || surface2value == "3" )
					illstring += coatingimage;
				illstring += substrateimage;
				illstring1 += "&nbsp;3&nbsp;4";
				if(surface1value == "4" || surface2value == "4" )
					illstring += coatingimage;
				if(isvalue != "" && isvalue != "null") {//ig
					illstring += igimage;
					illstring1 += "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
				}
				if(surface1value == "5" || surface2value == "5" )
					illstring += coatingimage;
				if(isvalue != "" && isvalue != "null") {
					illstring += substrateimage;
					illstring1 += "&nbsp;5&nbsp;6";
				}
				if(surface1value == "6" || surface2value == "6" )
					illstring += coatingimage;
				if(islvalue != "" && islvalue != "null") {//lami
					illstring += lamiimage;
					illstring1 += "&nbsp;";
					if(surface1value == "7" || surface2value == "7" )
						illstring += coatingimage;
					illstring += substrateimage;
					illstring1 += "&nbsp;7&nbsp;8";
					if(surface1value == "8" || surface2value == "8" )
						illstring += coatingimage;
				} 
			} else {//not lami
				if(isvalue != "" && isvalue != "null") {//ig
					illstring += igimage;
					illstring1 += "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
				}
				if(surface1value == "3" || surface2value == "3" )
					illstring += coatingimage;
				if(isvalue != "" && isvalue != "null") {
					illstring += substrateimage;
					illstring1 += "&nbsp;3&nbsp;4";
				}
				if(surface1value == "4" || surface2value == "4" )
					illstring += coatingimage;
				if(islvalue != "" && islvalue != "null") {//lami
					illstring += lamiimage;
					illstring1 += "&nbsp;";
					if(surface1value == "5" || surface2value == "5" )
						illstring += coatingimage;
					illstring += substrateimage;
					illstring1 += "&nbsp;5&nbsp;6";
					if(surface1value == "6" || surface2value == "6" )
						illstring += coatingimage;
				} 
			}
			var illdiv = document.getElementById("illustrationbuild");
			var illdiv1 = document.getElementById("illustrationbuild1");
			illdiv1.innerHTML = illstring1;
			illdiv.innerHTML = illstring;
			return false;
		 }
		 
        function getProductDetail(productid) {
        var http = new HTTPRequest();
        var requestvars = "";
        requestvars = "?id=" + productid + "&spacerurl=sunguard/documents/web_content/gi_001658.gif";
        requestvars = requestvars + "&region=" + region;
        requestvars = requestvars + "&language=" + language;
        requestvars = requestvars + "&siteid=" + SiteId;
        requestvars = requestvars + "&urlbeginning=" + RelativeWebRoot + "groups/";

        http.open("GET", RelativeWebRoot + "groups/jsp/documents/web_assets/gi_001786.jsp" + requestvars, true);
        http.onreadystatechange = function (){ handleFabHttpResponse(http)};
        http.send(null);
        }
        function handleFabHttpResponse(http) {
        if (http.readyState == 4) {
        result = http.responseText;
        var sidebar = document.getElementById("resultspanel");
        sidebar.innerHTML = result;
		buildProductDetailillustration();
        }
        }

        function getProductRYG(productid) {
        var http = new HTTPRequest();
        var requestvars = RelativeWebRoot + "groups/jsp/documents/web_assets/gi_002931.jsp"
		 + "?id=" + productid
         + "&substrate=O"
         + "&region=" + region;
        var requestvars2 = RelativeWebRoot + "groups/jsp/documents/web_assets/gi_002931.jsp"
		 + "?id=" + productid
         + "&substrate=I"
         + "&region=" + region;

        http.open("GET", requestvars, true);
        http.onreadystatechange = function (){ handleFabHttpResponse1(http)};
        http.send(null);
        var http2 = new HTTPRequest();
        http2.open("GET", requestvars2, true);
        http2.onreadystatechange = function (){ handleFabHttpResponse2(http2)};
        http2.send(null);
        }
        function handleFabHttpResponse1(http) {
        if (http.readyState == 4) {
        var result = http.responseText;
        var sidebar = document.getElementById("outryg");
        if(result == "R")
        	result = RelativeWebRoot + "groups/sunguard/documents/web_content/gi_001787.gif";
        else if(result == "G")
        	result = RelativeWebRoot + "groups/sunguard/documents/web_content/gi_001788.gif";
        else if(result == "Y")
        	result = RelativeWebRoot + "groups/sunguard/documents/web_content/gi_001789.gif";
        sidebar.src = result;
        }
        }
        function handleFabHttpResponse2(http) {
        if (http.readyState == 4) {
        var result = http.responseText;
        var sidebar = document.getElementById("inryg");
        if(result == "R")
        	result = RelativeWebRoot + "groups/sunguard/documents/web_content/gi_001787.gif";
        else if(result == "G")
        	result = RelativeWebRoot + "groups/sunguard/documents/web_content/gi_001788.gif";
        else if(result == "Y")
        	result = RelativeWebRoot + "groups/sunguard/documents/web_content/gi_001789.gif";
        sidebar.src = result;
        }
        }
         function askproductsbycolorgroupprint(color) {
        var http = new HTTPRequest();
        var requestvars = "";
        requestvars = "?region=" + region
        			+ "&language=" + language
        			+ "&colorgroup=" + color
//        			+ "&sampleurl=" + RelativeWebRoot + "groups/sunguard/documents/web_content/gi_002350.gif"
//        			+ "&projectdatabaseurl=" + RelativeWebRoot + "groups/sunguard/documents/web_content/gi_002350.gif"
//        			+ "&productdetailurl=" + RelativeWebRoot + "groups/sunguard/documents/web_content/gi_002350.gif"
//        			+ "&emailurl=" + RelativeWebRoot + "groups/sunguard/documents/web_content/gi_002350.gif"
//        			+ "&printurl=" + RelativeWebRoot + "groups/sunguard/documents/web_content/gi_002350.gif"
        			+ "&imageurl=" + RelativeWebRoot + "groups/jsp/documents/web_content/gi_002864.jsp"
        			+ "&image2url=" + RelativeWebRoot + "groups/jsp/documents/web_content/gi_002445.jsp";
					requestvars = requestvars + "&siteid=" + SiteId;
        http.open("GET", "" + RelativeWebRoot + "groups/jsp/documents/web_content/gi_002430.jsp" + requestvars, true);
        http.onreadystatechange = function (){ handleHttpResponseproductsbycolorgroupprint(http)};
        http.send(null);
        }
        function handleHttpResponseproductsbycolorgroupprint(http) {
        if (http.readyState == 4) {
        result = http.responseText;
        var projectfeaturedlist = document.getElementById("colorfamily");
        projectfeaturedlist.innerHTML = result;
      	window.print();
        }           
        }





         function askproductsbyseries(series) {
        var http = new HTTPRequest();
        var requestvars = "";
        requestvars = "?region=" + region
        			+ "&language=" + language
			        + "&siteid=" + SiteId
        			+ "&seriesgroup=" + series
			        + "&serverroot=" + ServerRelativeSiteRoot
//        			+ "&sampleurl=" + RelativeWebRoot + "groups/sunguard/documents/web_content/gi_002350.gif"
//        			+ "&projectdatabaseurl=" + RelativeWebRoot + "groups/sunguard/documents/web_content/gi_002350.gif"
//        			+ "&productdetailurl=" + RelativeWebRoot + "groups/sunguard/documents/web_content/gi_002350.gif"
//        			+ "&emailurl=" + RelativeWebRoot + "groups/sunguard/documents/web_content/gi_002350.gif"
//        			+ "&printurl=" + RelativeWebRoot + "groups/sunguard/documents/web_content/gi_002350.gif"
        			+ "&imageurl=" + RelativeWebRoot + "groups/jsp/documents/web_content/gi_002864.jsp";
        http.open("GET", "" + RelativeWebRoot + "groups/jsp/documents/web_content/gi_002440.jsp" + requestvars, true);
        http.onreadystatechange = function (){ handleHttpResponseproductsbyseries(http)};
        http.send(null);
        }
        function handleHttpResponseproductsbyseries(http) {
        if (http.readyState == 4) {
        result = http.responseText;
        var projectfeaturedlist = document.getElementById("colorfamily");
        projectfeaturedlist.innerHTML = result;
        }           
        }
         function appearancebyseriessubmit(productid, coatingid) {
         	//radiovalue = document.getElementById("constructiontype").value;
			var requestvars = "?id=" + productid + "&coatingid=" + coatingid;// + "&constructiontype=" + radiovalue;
			location.href=ServerRelativeSiteRoot + "SunguardProducts/ProductsbySeries/SeriesSelector/Results/index.htm" + requestvars;
        }
        function getPerformanceDataComparison() {
        var http = new HTTPRequest();
        var theForm = document.getElementById('appearance');


		var selprods="";
		for(var i=0; i < theForm.selectedproducts.length; i++){
			if(theForm.selectedproducts[i].checked || whichPressed == "compareall") {
				if(selprods.length == 0) {
					selprods = theForm.selectedproducts[i].value;
				} else {
					selprods +="," + theForm.selectedproducts[i].value;
				}
			}
		}

        
        var requestvars = ""
        + "?selectedproducts=" + selprods;

        window.location = ServerRelativeSiteRoot + "SunguardProducts/PerformanceComparisonTool/index.htm" + requestvars;
		return false;
        }
         function askproductsbyseriesprint(series) {
        var http = new HTTPRequest();
        var requestvars = "";
        requestvars = "?region=" + region
        			+ "&language=" + language
        			+ "&seriesgroup=" + series
//        			+ "&sampleurl=" + RelativeWebRoot + "groups/sunguard/documents/web_content/gi_002350.gif"
//        			+ "&projectdatabaseurl=" + RelativeWebRoot + "groups/sunguard/documents/web_content/gi_002350.gif"
//        			+ "&productdetailurl=" + RelativeWebRoot + "groups/sunguard/documents/web_content/gi_002350.gif"
//        			+ "&emailurl=" + RelativeWebRoot + "groups/sunguard/documents/web_content/gi_002350.gif"
//        			+ "&printurl=" + RelativeWebRoot + "groups/sunguard/documents/web_content/gi_002350.gif"
        			+ "&imageurl=" + RelativeWebRoot + "groups/jsp/documents/web_content/gi_002864.jsp";
					requestvars = requestvars + "&siteid=" + SiteId;
        http.open("GET", "" + RelativeWebRoot + "groups/jsp/documents/web_content/gi_002440.jsp" + requestvars, true);
        http.onreadystatechange = function (){ handleHttpResponseproductsbyseriesprint(http)};
        http.send(null);
        }
        function handleHttpResponseproductsbyseriesprint(http) {
        if (http.readyState == 4) {
        result = http.responseText;
        var projectfeaturedlist = document.getElementById("seriesfamily");
        projectfeaturedlist.innerHTML = result;
      	window.print();
        }           
        }
        