function setImageSrc(el,newsrc){
	var src = el.attr("src");
	var pro = jQuery.url.setUrl(src).attr("protocol");
	if(pro == null){
		el.attr("src", newsrc);
	}else{
		var lin = newsrc.lastIndexOf("/");
		var path = newsrc.substring(0,lin);
		var ni = src.indexOf(path);
		var destSrc;
		if(ni != -1){
			destSrc = src.substring(0,ni) + newsrc;
			el.attr("src", destSrc)
		}
	}
}

// This function is used to pop up a new window
function popupWindow(url, width, height, scroll) {      
    // Set width as optional parameter
    if (width === undefined ) {
        width = 400;
    }

    // Set height as optional parameter
    if (height === undefined ) {
        height = 300;
    }
    
    // Set scroll as optional parameter
    if (scroll === undefined) {
        scroll = 'yes';    
    }        
    
    var LeftPosition= (screen.width - width) / 2;
    var TopPosition= (screen.height - height) / 2;
    var settings = 'width=' + width + ',height=' + height + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=' + scroll + ',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes';
    win = window.open(url, "popup", settings);
    if (win.focus) {
        win.focus();
    }
	return false;
}

// This function is used to close window
function closeWindow() {
    window.close();
	return false;
}