
function objSetStyle (obj,prop,val) {
 		obj.style.cursor = 'hand';
		var tmp = document.getElementById('menuColor').currentStyle.backgroundColor;
		if (tmp != obj.bgColor) {
			obj.bgColor = tmp;
		} else {obj.bgColor = "";}
}

/*
var t = document.getElementById('igor');
		// t.currentStyle.color = "yellow";
		alert(t.currentStyle.color);
*/

function callUrl (val) {
 		window.location.href = val;
		
}


function delete_record(url,string) {
	var where_to = confirm("Do you really want to delete this record?\r\n" + string);
	if (where_to == true) {
		window.location = url;
	}
}

function newsletterUnsubscribe(f,fields_string,submit_page){
     var where_to = confirm("Do you really want to unsubscribe from our newsletter database?");
	if (where_to == true) {
	    f.operation.value="remove";
	    required_fields (f,fields_string,submit_page);
	}
    
}

function required_fields (f,fields_string,submit_page) {
	fields = fields_string.split(",");
	var re = /^(\w|[^_]\.|[\-])+((\@){1}([^_]))(([a-z]|[\d]|[\-]|\.)+|([^_]\.[^_])*)+\.[a-z]{2,6}$/;	
	submit_form = true;
	for (var i=0;i < fields.length;i++) {
		field_name = fields[i];
		if (field_name=="email") {
			if (!re.test(f.elements[field_name].value)) {
				submit_form = false;
				message ="\nWrong email address!";
			}
		} else {
			if (f.elements[field_name].value==""){
				submit_form = false;
				message ="Please fill out required fields!";
			}
		}
	}

	if (submit_form == true) {
		f.action = submit_page;
		f.submit();
	} else {
		alert(message);
	}
}

function Go_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function New_Window(name,url,scrollbars,toolbar,location,status,menubar,resizable,width,height,left,top) {
	var properties = "scrollbars=" + scrollbars + ",toolbar=" + toolbar + ",location=" + location + ",status=" + status + ",menubar=" + menubar + ",resizable=" + resizable + ",width=" + width + ",height=" + height + ",left=" + left + ",top=" + top;
 	window.open(url,name,properties);
}