function changeBg(obj,color){
	obj.style.backgroundColor = color;
}

function openImg(url,width,height) {
	var newwindow = "";
	if (newwindow.location && !newwindow.closed) {
		newwindow.location.href = url; 
		newwindow.focus(); 
	} else { 
		newwindow=window.open(url,'eShopWin','width='+width+',height='+height+',resizable=0');
	} 
	
	newwindow.document.body.style.margin = "0 0 0 0";
}

function runSearch(url){
	var searchStr = document.getElementById("searchBox").value;
	var searchStrFirst = document.getElementById("searchBoxFirstStr").value
	if(searchStr == searchStrFirst){
		searchStr = "";
	}
	window.location = url+searchStr;
}

function openW(mypage,myname,w,h,features) {
	if(screen.width){
		var winl = (screen.width-w)/2;
		var wint = (screen.height-h)/2;
	}else{
		winl = 0;
		wint = 0;
	}
	if (winl < 0) winl = 0;
	if (wint < 0) wint = 0;
	var settings = 'height=' + h + ',';
		settings += 'width=' + w + ',';
		settings += 'top=' + wint + ',';
		settings += 'left=' + winl + ',';
		settings += features;
		
	win = window.open(mypage,myname,settings);
	win.window.focus();
}

function send(bSelf){
	var mail = document.getElementById("email").value;
	window.location = bSelf+'?&cmd=fPass&mail='+mail;
}
