// -->


function selectBox(element){
	if(element.createTextRange != null){
		txtRange=element.createTextRange();
		formValue=element.value;
		txtRange.select();
	}
}

function clearField(element,defaultValue){
	strValue=element.value;
	if(element && strValue==defaultValue){
		element.value="";
		selectBox(element);
	}else{
		selectBox(element);
	}
}



var url = window.location;
var who = 'Shape Arts'
		
function makeFavourite(){
	window.external.AddFavorite(url,who);
}

function popWindowOpener(url,winName,width,height,isScroll){
	var screenW = 0;
	var screenH = 0;
	var scroll = 'scrollbars = yes';
	if(screen.width){
		screenW = screen.width;
		screenH = screen.height;
	}else{
		screenW = 800;
		screenH = 600;
	}
	if(isScroll){
	}else{
		scroll = 'scrollbars = no';
	}
	var boxWidth = width;
	var boxHeight = height;
	// 12 and 52 values are for the bars on the newwindow
	// note: only ie has constant bars, netscape 4+ adds as necc
	var windowLeft = ((screenW - boxWidth)/2-10);
	var windowTop = ((screenH - boxHeight)/2-52);
	window.open(url,winName,'' + scroll + ',resizable=yes,status=no,width=' + width + ',height=' + height + ',left=' + windowLeft + ',top=' + windowTop);
}

function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}
window.onload = externalLinks;

//  End -->