function getProtocol(){
	var url = document.location + "";
	
	if(url.indexOf("http://") != -1){
		return "http:";
	} else {
		return "https:";
	}
}

function replaceProtocol(str){
	var protoreg = /\x24(protocol)/gi;
	str = str.replace(protoreg, getProtocol());
	return str;
}


