﻿function gotoUrl(id) {
	var e = document.getElementById('url');
	window.location.href = e.options[e.selectedIndex].value;
}
function chgAttr(node,attr,show,hide,prop,eval) {//fill,none
	var e = document.getElementById(node);
	var a = document.createAttribute(attr);
	if (prop != eval){
	a.nodeValue = show;
	e.setAttributeNode(a);
	} else {
	a.nodeValue = hide;
	e.setAttributeNode(a);
	}
}
function readonly(a,b){//b = boolean
	var l = a.length;
	for (var i=0; i<l; i++) {
		var e = document.getElementById(a[i]);
		if (b) {
		e.setAttribute('readonly','readonly');
		} else {
		e.removeAttribute('readonly');
		}
	}
}
function loadImg(tar,img) {
	var l = document.images.length;
	for (var i = 0; i < l; i++) {
		load(tar, img);
    	if(l[i] == img) {
         alert('loaded');
    	}
	}
}