//| event attach replacement
document.addEvent = function(object, eventType,fn, useCapture) {
	if (object.addEventListener) {
		object.addEventListener(eventType, fn, useCapture);
		return true;
	} else {
		if (object.attachEvent) {
			var r = object.attachEvent("on"+eventType, fn);
			return r;
		}
	}
};

//| zoom
function zoomPhoto(imageName, imageWidth, imageHeight, imageTitle){
   	var posLeft = Math.floor( (screen.width - imageWidth) / 2);
    var posTop = Math.floor( (screen.height - imageHeight) / 2);
	newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",scrollbars=no,left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><meta http-equiv="imagetoolbar" content="no"><title>'+imageTitle+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onload="document.title = \''+imageTitle+'\'" onBlur="self.close()">'); 
	newWindow.document.write('<img src=\"'+imageName+'\" width='+imageWidth+' height='+imageHeight+' alt=\"'+imageName+'\">');
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
	return false;
}

//| google toolbar css disable
function disableGoog(){
	inputList = document.getElementsByTagName("INPUT");
	for(i=0;i<inputList.length;i++){
	  //inputList[i].attachEvent("onpropertychange",);
	  document.addEvent(inputList[i],"propertychange",restoreStyles);
	  inputList[i].style.backgroundColor = "";
	}
	selectList = document.getElementsByTagName("SELECT");
	for(i=0;i<selectList.length;i++){
	  //selectList[i].attachEvent("onpropertychange",restoreStyles);
	  document.addEvent(selectList[i],"propertychange",restoreStyles);
	  selectList[i].style.backgroundColor = "";
	}
}

function openWindow(url, width, height) {
	newWindow = window.open(url, 'nwin', 'width='+width+',height='+height+',scrollbars=no');
}

function restoreStyles(){
	if(event.srcElement.style.backgroundColor != "")
		event.srcElement.style.backgroundColor = "";
}

// call it
document.addEvent(window,'load',disableGoog);