<!--

var JS_Image = new Array()
function SetImage(offsrc, onsrc, txt){
        if (document.images){
                this['mouse_out'] = new Image();
                this['mouse_out'].src = offsrc;
                this['mouse_over'] = new Image();
                this['mouse_over'].src = onsrc;
        }this['text'] = txt;
}
function RollOver(imgname){
        if (document.images){
                document.images[imgname].src = JS_Image[imgname]['mouse_over'].src;
                window.status = JS_Image[imgname]['text'];
        }
}
function RollOut(imgname){
        if (document.images){
                document.images[imgname].src = JS_Image[imgname]['mouse_out'].src;
                window.status = '';
        }
}
JS_Image['home'] = new SetImage('images/nav_home.gif', 'images/nav_home_on.gif', 'Home');
JS_Image['gallery'] = new SetImage('images/nav_gallery.gif', 'images/nav_gallery_on.gif', 'Gallery');
JS_Image['projects'] = new SetImage('images/nav_projects.gif', 'images/nav_projects_on.gif', 'Client Projects');
JS_Image['workshops'] = new SetImage('images/nav_workshops.gif', 'images/nav_workshops_on.gif', 'Workshops');
JS_Image['about'] = new SetImage('images/nav_about.gif', 'images/nav_about_on.gif', 'About Us');
JS_Image['contact'] = new SetImage('images/nav_contact.gif', 'images/nav_contact_on.gif', 'Contact Us');


function LaunchNew(location,w,h,name)
{
 nw=window.open(location, name, "width=" + w + ",height=" + h +
",status=no,toolbar=no,location=no,menubar=no,scrollbars=no,resizable=no")
;
}


function LaunchNewScroll(location,w,h,name)
{
 nw=window.open(location, name, "width=" + w + ",height=" + h +
",status=no,toolbar=no,location=no,menubar=no,scrollbars=yes,resizable=no")
;
}


function OpenSamplePop(img,w,h,title)
{
 nw=window.open("sample_pop.php?img=" + img + "&w=" + w + "&h=" + h + "&title=" + URLEncode(title), img, "width=" + w + ",height=" + h +
",status=no,toolbar=no,location=no,menubar=no,scrollbars=no,resizable=no")
;
}



function URLEncode(sValue)
{
	var SAFECHARS = "0123456789" +						/* Numeric */
					"ABCDEFGHIJKLMNOPQRSTUVWXYZ" +		/* Alphabetic */
					"abcdefghijklmnopqrstuvwxyz" +
					"-_.!~*'()";						/* RFC2396 special characters */
	
	var HEX = "0123456789ABCDEF";

	var plaintext = sValue;
	var encoded = "";
	for (var i = 0; i < plaintext.length; i++ ) {
		var ch = plaintext.charAt(i);
	    if (ch == " ") {
		    encoded += "+";				// x-www-urlencoded, rather than %20
		} else if (SAFECHARS.indexOf(ch) != -1) {
		    encoded += ch;
		} else {
		    var charCode = ch.charCodeAt(0);
			if (charCode > 255) {
			    alert( "Unicode Character '" 
                        + ch 
                        + "' cannot be encoded using standard URL encoding.\n" +
				          "(URL encoding only supports 8-bit characters.)\n" +
						  "A space (+) will be substituted." );
				encoded += "+";
			} else {
				encoded += "%";
				encoded += HEX.charAt((charCode >> 4) & 0xF);
				encoded += HEX.charAt(charCode & 0xF);
			}
		}
	} // for

	return encoded;
};
//-->