/*
	project: KSA
	copyright 2005
	built by south5
	file: misc.js
	version 1.0
*/

        <!-- //
                ns = (document.layers)? true:false;
                ie = (document.all)? true:false;
        //-->

			function swap()
			{
				if (document.images)
				{
					for (var x=0; x<swap.arguments.length; x+=2) 
					{
						document[swap.arguments[x]].src = eval(swap.arguments[x+1] + ".src");
					}
				}
			}
			
			// This is the code to make the detail page(s)
			
			function zoomArtpiece(imgNumber,imgPath) {
                var screenBottomBuffer = 70;
                var maxPopupHeight = 650;
                var maxPopupWidth = 640
                var determinedHeight = 0;
                var popupProperties = "";

                if ( screen.height ) {
                        determinedHeight = screen.height >= (maxPopupHeight + screenBottomBuffer) ? maxPopupHeight : (screen.height - screenBottomBuffer);
                } else {
                        determinedHeight = maxPopupHeight;
                }

                popupProperties = 'width=' + maxPopupWidth + ',height=' + determinedHeight + ',scrollbars=1,location=0,status=0,resizable=0,top=0,left=0';

                window.open('zoom_popup.php?bigImgName=' + imgNumber + '&varType=' + imgPath + '', 'KSA', popupProperties);
            }

			// This is the code to list out the Path for the image in the pop-up

			function getValue()
			{
				//alert(window.location.href);
				var url = window.location.href;
				//url = "zoom_popup.html?bigImgName=dk_test_001c.jpg";
			
				var qparts = url.split("=")[1].split("&")[0];
				//alert(qparts[1]);
				
				return qparts;
			}
			
			function getType()
			{
				var later = window.location.href;
				
				var second = later.split("&varType=");
				
				return second[1];
			}

			function printImageUrl()
			{
				var imgNameLoc = getValue();
				var imageType = getType();
				//alert("This should be one or the other - which is it: " + imageType);
				//alert("This is working up to this point - " + imgNameLoc);
				document.write( "<img src=\"images/" + imageType + "/600px/" + imgNameLoc + "\" border=\"0\" />" );
				//document.write( "<img src=\"images/projects_residential/600px/chase_001_600px.jpg\" border=\"0\" />" );
			}
