function hiLite(imgDocID,imgObjName) {
        if (document.images) 
        document.images[imgDocID].src = eval(imgObjName + ".src")
}



function validEmail (email) {
	
	forbidden = "/:,;"
     if (email == "")
      {return false}

     for (i=0; i<forbidden.length; i++)
     {zlyZnak=forbidden.charAt(i)
     if (email.indexOf(zlyZnak,0) != -1)
      {return false}
     }

     malpaPoz=email.indexOf("@",0)
     if (malpaPoz == -1 || malpaPoz == 0)
      {return false}

     if (email.indexOf("@",malpaPoz+1) != -1)
      {return false}

     kropkaPoz = email.indexOf(".",malpaPoz)
     if (kropkaPoz == -1 || kropkaPoz == malpaPoz+1)
      {return false}

     if (kropkaPoz+3 > email.length)
      {return false}

     return true
}




/**
 * Load data (array) to Select element
 * 
 * @param array data - options data in 2-dimentional array e.g. [[value_1, text_1], [value_2, text_2], ... ]
 * @param selectedValue - value of selected option
 */

function selectLoadArray (elementId, data, selecedValue) {
	
	var selectEl = document.getElementById(elementId);
	
	// clear options
	selectEl.length = 0;
	
	// add options
	for (i = 0; i <= data.length; i++) {
		
		var item = data[i];
		
		if (item) {
			
		
			var option = document.createElement('option')
			option.value = item[0]
			option.text = item[1]
			if (item[0] == selecedValue) option.selected = true
			
			try {
				selectEl.add(option, null) // standards compliant; doesn't work in IE
			}
			catch(ex) {
				selectEl.add(option) // IE only
			}	
			
		}
	}
	
};




function thumbPopup(mypage, myname, w, h, caption) {
        if (caption == 'true'){
            caption_name = myname;
        }else{
            caption_name = "";
        }
        var props = '';
        var orig_w = w;
        var scroll = '';
        var winl = (screen.availWidth - w) / 2;
        var wint = (screen.availHeight - h) / 2;
        if (winl < 0) { winl = 0; w = screen.availWidth -6; scroll = 1;}
        if (wint < 0) { wint = 0; h = screen.availHeight - 32; scroll = 1;}
        winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=no'
        win = window.open('', 'myThumb', winprops)
        win.document.open();
        win.document.write('<html><head>');
        win.document.write('<title>'+myname+'</title></head>');
        win.document.write('<body style="margin:0; cursor:pointer">');
        win.document.write('<img src="'+mypage+'" border="0" alt="Close" onclick="window.close()">');
        win.document.write('</body></html>');

        win.document.close();
        if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }

}