function addEvent(obj, evType, fn) {
	if (obj.addEventListener) {
		obj.addEventListener(evType, fn, true);
		return true;
	} else if (obj.attachEvent) {
		var r = obj.attachEvent("on"+evType, fn); 
		return r;
	} else {
		return false;
	}
}
function inputFocus() {
	if(this.value==this.title)this.value='';
}
function inputBlur() {
	if(this.value=='')this.value=this.title;
}
function inputs_prepopulate() {
	inputs = document.getElementsByTagName('input');
	n_inputs = inputs.length;
	for (i = 0; i < n_inputs; i++) {
			if ((inputs[i].type=='text') && (inputs[i].title!='')){
					inputs[i].value=inputs[i].title;
					inputs[i].onfocus=inputFocus;
					inputs[i].onblur=inputBlur;
			}
	}
}
function prepopulate() {
	inputs_prepopulate();
}

function showPic (whichpic) {
    if (document.getElementById) {
        document.getElementById('placeholder').src = whichpic.href;
        return false;
    } 
    else {
        return true;
    }
}

addEvent(window, 'load', prepopulate);

if (document.all && document.styleSheets && document.styleSheets[0] && document.styleSheets[0].addRule) {
    // Feel free to add rules for specific tags only, you just have to call it several times.
    //document.styleSheets[0].addRule('.logotype', 'behavior: url(/templates/js/iepngfix.htc)');
}
