var header_org_bkg;
function switchForm(val) {
	var arrForm = {1:"intro",2:"freeconsultation",3:"callme"}
	for (var i in arrForm) {
		if(val == i) {
			showDiv(arrForm[i]+"Div");
			if (i==1 && window.location.href.indexOf('brokersolutions')>-1){
				var bkg = "brokersolutions";
			}else if (i==1 && window.location.href.indexOf('agentsolutions')>-1){
				var bkg = "agentsolutions";
			}else
				var bkg = arrForm[i];

			var switchtd_bkg = $('switchTD').style.background;
			var re = new RegExp("logo_\\w+");
			switchtd_bkg = switchtd_bkg.replace(re,"logo_"+bkg);
			$('switchTD').style.background = switchtd_bkg;
			if ($(arrForm[i]+"Form")){
				$(arrForm[i]+"Form").reset();
			}
		}
		else {
			hideDiv(arrForm[i]+"Div");
		}
	}
}


function switchDiv(div,cancel) {
	var arrDiv = {1:"links",2:"demo",3:"consultation"}
	
	for (var i in arrDiv) {
		if(cancel=="1") { 
			if(i==1)
				showDiv(arrDiv[i]+"Div");
			else
				hideDiv(arrDiv[i]+"Div");
		}
		else {
			if(div == i) {
				showDiv(arrDiv[i]+"Div");
				if ($(arrDiv[i]+"Form")){
					$(arrDiv[i]+"Form").reset();
				}
			}
			else {
				hideDiv(arrDiv[i]+"Div");
			}
		}
	}
}

var PARTNER_CONF = {"realtysoft.com":"RSFT","realtysoft.net":"RSNET","realtown.realtysoft.com":"REALT","konarealtorsites.com":"KONAR","cmssitebuilder.com":"CMSSB","kcrarmembersites.com":"KCRAR","realtysolutionswest.com":"RSWST","gmac.realtysoft.com":"GMAC","california-real-estate-websites.com":"CREW","website.realtyconsultants.ca":"RCON","justwebsite.realtyconsultants.ca":"JCON","rismedia.realtysoft.com":"RISM","activerain.realtysoft.com":"ACTR","customrewebsites.ca":"CUST","yourrealtyinsider.realtysoft.com":"YRIN"};

function switchTD(td,demo) {
	
	if(demo==1)
	var arrTD = {1:"default",2:"contact",3:"demo"};
	else
	var arrTD = {1:"default",2:"contact"};
	for (var i in arrTD) {
		if(i==td)
			$(arrTD[i]+"TD").style.display='block';
		else {
			if($(arrTD[i]+"TD"))
			$(arrTD[i]+"TD").style.display='none';
			if ($(arrTD[i]+"Form")){
				$(arrTD[i]+"Form").reset();
				$('associationormls').style.color="#999999";
				if($('associationormls2'))
				$('associationormls2').style.color="#999999";
				$('Name').style.color="#999999";
				$('Email').style.color="#999999";
				$('Phone').style.color="#999999";
				if($('Name2'))
				$('Name2').style.color="#999999";
				if($('Email2'))
				$('Email2').style.color="#999999";
				if($('Phone2'))
				$('Phone2').style.color="#999999";
			}
		}
	}
}

function submitForm(val) { 
	if(val=='contact') {
		var obj = document.contactForm;
		if(obj.associationormls.value=='Association or MLS Name') {
			alertMessage.show({msg:"Please enter your association or MLS name."},obj.associationormls);
			obj.associationormls.focus();
			return;
		}
	}
	else if(val=='demo') {
		var obj = document.demoForm;
		if(obj.associationormls2.value=='Association or MLS Name') {
			alertMessage.show({msg:"Please enter your association or MLS name."},obj.associationormls2);
			obj.associationormls2.focus();
			return;
		}
	}
	
	
	if(obj.Name.value=='Name') {
		alertMessage.show({msg:"Please enter your name."},obj.Name);
		obj.Name.focus();
		return;
	}
	else if(obj.Email.value=='Email') {
		alertMessage.show({msg:"Please enter your email."},obj.Email);
		obj.Email.focus();
		return;
	}
	else if(!isEmail(obj.Email.value)) {
		alertMessage.show({msg:"Invalid email address."},obj.Email);
		obj.Email.focus();
		return;
	}
	else if(obj.Phone.value=="Phone") {
		alertMessage.show({msg:"Please enter your phone number."},obj.Phone);
		obj.Phone.focus();
		return;
	}
	
	var url = "/php/contact.ajax";
	var pars = "mode="+obj.Type.value;
	if(val=='contact') {
		if(obj.associationormls.value.indexOf("[")!=-1) 
			pars += "&ass=&mls="+obj.associationormls.value;
		else
			pars += "&ass="+obj.associationormls.value+"&mls="
	}
	else if(val=='demo') {
		if(obj.associationormls2.value.indexOf("[")!=-1) 
			pars += "&ass=&mls="+obj.associationormls2.value;
		else
			pars += "&ass="+obj.associationormls2.value+"&mls="
	}
	pars += "&name="+obj.Name.value+"&email="+obj.Email.value+"&userType="+obj.Title.value+"&telephone="+obj.Phone.value; 
	//var pars = "mode="+obj.Type.value+"&mls="+obj.associationormls.value+"&name="+obj.Name.value+"&email="+obj.Email.value+"&userType="+obj.Title.value+"&telephone="+obj.Phone.value;

	var onComplete = function(res) {
			$(val+"Form").reset();
			$('defaultTD').style.display="block";
			$('contactTD').style.display="none";
			$('demoTD').style.display="none";
			alertMessage.show({msg:"The info has been sent successfully."},$('defaultTD'));
	};
	MyAjax.post(url,pars, onComplete);		
}

function hiddenDefaultVal(obj) {
	if(obj.value==$("default"+obj.id).value) {
		obj.value = "";
		obj.style.color="#000000";
	}
}

function showDefaultVal(obj) {
	if(obj.value=="") {
		obj.value = $("default"+obj.id).value;
		obj.style.color="#999999";
	}
}

function trial(){
var domain = getDomain(window.location.href);
if (domain.indexOf('www')>-1) domain=domain.replace(/www\./,''); 
domain = domain.toLowerCase();
//testing 
//domain="realtysoft.net";
var url = "http://secure.realtysoft.com/registration/step1.php?trial";
for(var d in PARTNER_CONF){
	if (d == domain){url = url + "&p="+PARTNER_CONF[domain];}
}

window.location=url;
}

function signup(type,code) {
	var domain = getDomain(window.location.href);
	//var secureDomain = domain.replace(/www/,'secure');
	//var partner = (PARTNER_CONF[domain.replace(/www\./,'')]=='undefined')?'':PARTNER_CONF[domain.replace(/www\./,'')]; 
	//var url = "https://"+secureDomain+"/registration/step1.php?"+type+"&p="+partner;
	var url = "https://secure.realtysoft.com/registration/step1.php";
	//var url = "http://www.realtysoft.info/registration/step1.php";
	if(type) {
		url += "?"+type;
		if(code)
			url += "&p="+code;
	}
	else {
		if(code)
			url += "?p"+code;
	}
	//var url = "http://"+secureDomain+"/registration/step1.php?"+type+"&p="+partner;
	window.location=url;

}

function contact() {
	var url = $('pUrl').value+"/contact.php";
	window.location = url;
}

function goPage(page) {
	var url = $('pUrl').value+"/"+page+".php";
	window.location = url;
}

function checkFreeconsultationSubmit(val,path) {
	if($('FName').value=="") {
		alertMessage.show({msg:"Please enter your name"},$('FName'));
		return false;
	}
	else if($('FEmail').value=="") {
		alertMessage.show({msg:"Please enter your email"},$('FEmail'));
		return false;
	}
	else if($('FPhone').value=="") {
		alertMessage.show({msg:"Please enter your phone number"},$('FPhone'));
		return false;
	}
	else if($('FComments').value=="") {
		alertMessage.show({msg:"Please enter your comments"},$('FComments'));
		return false;
	}
	
	
	var pars = "mode=freeconsulation&name="+$('FName').value+"&userType="+$('FUserType').value+"&telephone="+$('FPhone').value+"&email="+$('FEmail').value+"&comments="+$('FComments').value;
	var url = '/php/contact.ajax';
	var onComplete = function(originalRequest) {
			switchForm(val);
	};
	MyAjax.post(url,pars, onComplete);	
}

function checkCallMeSubmit(val) {
	if($('CName').value=="") {
		alertMessage.show({msg:"Please enter your name"},$('CName'));
		return false;
	}
	else if($('Cphone').value=="") {
		alertMessage.show({msg:"Please enter your phone number"},$('CPhone'));
		return false;
	}
	
	var pars = "mode=callme&name="+$('CName').value+"&telephone="+$('CPhone').value+"&time="+$('CTime').value;
	var url = '/php/contact.ajax';
	var onComplete = function(originalRequest) {
			switchForm(val);
	};
	MyAjax.post(url,pars, onComplete);	
}

function send(form) {
	switch(form) {
		case "2":
			var o = document.demoForm;
			var pars = "mode=demo";
			break;
		case "3":
			var o = document.consultationForm;
			var pars = "mode=freeconsulation";
			break;
	}
	if(o.name.value=="") {
		alertMessage.show({msg:"Please enter your name."},o.name);
		return false;
	}
	else if(o.email.value==""){
		alertMessage.show({msg:"Please enter your email."},o.email);
		return false;
	}
	else if (!isEmail(o.email.value)){
		alertMessage.show({msg:"Invalid email address."},o.email);
		return false;
	}
	else if(o.phone.value=="") {
		alertMessage.show({msg:"Please enter your phone number."},o.phone);
		return false;
	}

	pars += "&name="+o.name.value+"&userType="+o.title.value+"&telephone="+o.phone.value+"&email="+o.email.value;
	var url = '/php/contact.ajax';
	var onComplete = function(originalRequest) {
			if(originalRequest=='1') 
				var res = "Your request has been sent out.";
			else
				var res = "System is busy, please try again later.";
			alertMessage.show({msg:res},o.phone);
			if(originalRequest=='1') 
				switchDiv(form,"1");
	};
	MyAjax.post(url,pars, onComplete);
}


var showTemplates = function() {
	var x = 1;
	var y = 1;
	var playing = 0;

	return {
		init : function() {x=1;y=1;},
		move : function(direction) {
			if (playing == 1) {return;}
			switch(direction) {
				case 'aLeftMove':
					if ( x === 1 ) {
						return;
					}
					var aAttributes = {points : {by : [103, 0]}};
					x--;
					break;
				case 'bLeftMove':
					if ( y === 1 ) {
						return;
					}
					var bAttributes = {points : {by : [103, 0]}};
					y--;
					break;
				case 'aRightMove':
					if ( x === 21 ) {
						return;
					}
					var aAttributes = {points : {by : [-(103), 0]}};
					x++;
					break;
				case 'bRightMove':
					if ( y === 20 ) {
						return;
					}
					var bAttributes = {points : {by : [-(103), 0]}};
					y++;
					break;

				case 'aLeftMove7':
					if ( x === 1 ) {
						return;
					}
					var aAttributes = {points : {by : [317, 0]}};
					x--;
					break;
				case 'aLeftMoveA':
					if ( x === 1 ) {
						return;
					}
					var aAttributes = {points : {by : [315, 0]}};
					x--;
					if (x ===1){$('aLeftMoveA').style.visibility = "hidden";}
					if (x !==7){$('aRightMoveA').style.visibility = "visible";}
					break;
				case 'bLeftMove7':
					if ( y === 1 ) {
						return;
					}
					var bAttributes = {points : {by : [317, 0]}};
					y--;
					break;
				case 'bLeftMoveB':
					if ( y === 1 ) {
						return;
					}
					var bAttributes = {points : {by : [315, 0]}};
					y--;
					if (y ===1){$('bLeftMoveB').style.visibility = "hidden";}
					if (y !==7){$('bRightMoveB').style.visibility = "visible";}
					break;
				case 'aRightMove7':
					if ( x === 7 ) {
						return;
					}
					var aAttributes = {points : {by : [-(317), 0]}};
					x++;
					break;
				case 'aRightMoveA':
					if ( x === 14 ) {
						return;
					}
					var aAttributes = {points : {by : [-(315), 0]}};
					x++;
					if (x !==1){$('aLeftMoveA').style.visibility = "visible";}
					if (x ===14){$('aRightMoveA').style.visibility = "hidden";}
					break;
				case 'bRightMove7':
					if ( y === 7 ) {
						return;
					}
					var bAttributes = {points : {by : [-(317), 0]}};
					y++;
					break;
				case 'bRightMoveB':
					
					if ( y === 14 ) {return;}
					var bAttributes = {points : {by : [-(315), 0]}};
					y++;
					if (y !==1){$('bLeftMoveB').style.visibility = "visible";}
					if (y ===14){$('bRightMoveB').style.visibility = "hidden";}
					break;
				};
			if(direction.substr(0,1)=="a")
			var anim = new YAHOO.util.Motion('allAgentTemplates', aAttributes, 0.5, YAHOO.util.Easing.easeOut);
			else if(direction.substr(0,1)=="b")
			var anim = new YAHOO.util.Motion('allBrokerTemplates', bAttributes, 0.5, YAHOO.util.Easing.easeOut);
			var onStart = function() {playing = 1;}
			var onComplete = function() {playing = 0;}
			anim.onStart.subscribe(onStart);
			anim.onComplete.subscribe(onComplete);
			anim.animate();
		}
	};
}();


var aniTemplates = function() {
	var x = 1;
	var y = 1;
	var playing = 0;

	return {
		init : function() {x=1;y=1;},
		move : function(direction,pID) {
			if (playing == 1) {return;}
			switch(direction) {
				case 'aRightMoveA':
					if(pID=="0020")
					var num = 15;
					else
					var num = 14;
					if ( x === num ) {
						return;
					}
					var aAttributes = {points : {by : [-(315), 0]}};
					x++;
					if (x !==1){$('aLeftMoveA').style.visibility = "visible";}
					if (x ===num){$('aRightMoveA').style.visibility = "hidden";}
					break;
				case 'bRightMoveB':
					if(pID=="0020")
					var num = 15;
					else
					var num = 14;
					if ( y === num ) {return;}
					var bAttributes = {points : {by : [-(315), 0]}};
					y++;
					if (y !==1){$('bLeftMoveB').style.visibility = "visible";}
					if (y ===num){$('bRightMoveB').style.visibility = "hidden";}
					break;
				case 'aLeftMoveA':
					if ( x === 1 ) {
						return;
					}
					var aAttributes = {points : {by : [315, 0]}};
					x--;
					if (x ===1){$('aLeftMoveA').style.visibility = "hidden";}
					if (x !==7){$('aRightMoveA').style.visibility = "visible";}
					break;
				case 'bLeftMoveB':
					if ( y === 1 ) {
						return;
					}
					var bAttributes = {points : {by : [315, 0]}};
					y--;
					if (y ===1){$('bLeftMoveB').style.visibility = "hidden";}
					if (y !==7){$('bRightMoveB').style.visibility = "visible";}
					break;
				};
			if(direction.substr(0,1)=="a")
			var anim = new YAHOO.util.Motion('allAgentTemplates', aAttributes, 0.5, YAHOO.util.Easing.easeOut);
			else if(direction.substr(0,1)=="b")
			var anim = new YAHOO.util.Motion('allBrokerTemplates', bAttributes, 0.5, YAHOO.util.Easing.easeOut);
			var onStart = function() {playing = 1;}
			var onComplete = function() {playing = 0;}
			anim.onStart.subscribe(onStart);
			anim.onComplete.subscribe(onComplete);
			anim.animate();
		}
	};
}();


var animTemplates = function() {
	var x = 1;
    var playing = 0;
	return {
		init : function(t) {},
		move : function(direction,type) {
			//var total = (type==1)? 21:20;
			var total = 42;
			if (playing ==1){return;}
			switch(direction) {
				case 'left':
					if ( x === 1 ) {
						return;
					}
					var aAttributes = {points : {by : [203, 0]}};
					x--;
					if (x ===1){$('leftMove').style.visibility = "hidden";}
					if (x !==total){$('rightMove').style.visibility = "visible";}
					break;
				case 'right':
				if ( x === total) {
						return;
					}
					var aAttributes = {points : {by : [-(203), 0]}};
					x++;
					if (x !==1){$('leftMove').style.visibility = "visible";}
					if (x ===total){$('rightMove').style.visibility = "hidden";}
					break;
				};
			var anim = new YAHOO.util.Motion('templates', aAttributes, 0.5, YAHOO.util.Easing.easeOut);
			var onStart = function() {playing = 1;}
			var onComplete = function() {playing = 0;}
			anim.onStart.subscribe(onStart);
			anim.onComplete.subscribe(onComplete);
			anim.animate();
		}
	};
}();


var animPrintGallery = function() {
	var x = 1;
    var playing = 0;
	return {
		init : function(t) {},
		move : function(direction,type) {
			//var total = (type==1)? 21:20;
			var total = 5;
			if (playing ==1){return;}
			switch(direction) {
				case 'left':
					if ( x === 1 ) {
						return;
					}
					var aAttributes = {points : {by : [203, 0]}};
					x--;
					if (x ===1){$('leftMove').style.visibility = "hidden";}
					if (x !==total){$('rightMove').style.visibility = "visible";}
					break;
				case 'right':
				if ( x === total) {
						return;
					}
					var aAttributes = {points : {by : [-(203), 0]}};
					x++;
					if (x !==1){$('leftMove').style.visibility = "visible";}
					if (x ===total){$('rightMove').style.visibility = "hidden";}
					break;
				};
			var anim = new YAHOO.util.Motion('templates', aAttributes, 0.5, YAHOO.util.Easing.easeOut);
			var onStart = function() {playing = 1;}
			var onComplete = function() {playing = 0;}
			anim.onStart.subscribe(onStart);
			anim.onComplete.subscribe(onComplete);
			anim.animate();
		}
	};
}(); 

var animClientSites = function() {
	var x = 1;
    var playing = 0;
	return {
		init : function(t) {},
		move : function(direction,total) {

			if (playing ==1){return;}
			switch(direction) {
				case 'left':
					if ( x == 1 ) {
						return;
					}
					var aAttributes = {points : {by : [203, 0]}};
					x--;
					if (x ==1){$('leftMove').style.visibility = "hidden";}
					if (x !=total){$('rightMove').style.visibility = "visible";}
					break;
				case 'right':
				if ( x == total) {
						return;
					}
					var aAttributes = {points : {by : [-(203), 0]}};
					x++;
					if (x !=1){$('leftMove').style.visibility = "visible";}
					if (x ==total){$('rightMove').style.visibility = "hidden";}
					break;
				};
			var anim = new YAHOO.util.Motion('templates', aAttributes, 0.5, YAHOO.util.Easing.easeOut);
			var onStart = function() {playing = 1;}
			var onComplete = function() {playing = 0;}
			anim.onStart.subscribe(onStart);
			anim.onComplete.subscribe(onComplete);
			anim.animate();
		}
	};
}(); 


var showTestmonial = function() {
	var x = 1;
	var y = 1;
	var total=1;
	var playing = 0;

	return {
		init : function(t) {total=t;},
		move : function(direction) {
			if (playing ==1){return;}
			switch(direction) {
				case 'left':
					if ( x === 1 ) {
						return;
					}
					var aAttributes = {points : {by : [210, 0]}};
					x--;
					if (x ===1){$('leftMoveT').style.visibility = "hidden";}
					if (x !==total){$('rightMoveT').style.visibility = "visible";}
					break;
				case 'right':
				if ( x === total) {
						return;
					}
					var aAttributes = {points : {by : [-(210), 0]}};
					x++;
					if (x !==1){$('leftMoveT').style.visibility = "visible";}
					if (x ===total){$('rightMoveT').style.visibility = "hidden";}
					break;
				};
			var anim = new YAHOO.util.Motion('allTestimonials', aAttributes, 0.5, YAHOO.util.Easing.easeOut);
			var onStart = function() {playing = 1;}
			var onComplete = function() {playing = 0;}
			anim.onStart.subscribe(onStart);
			anim.onComplete.subscribe(onComplete);
			anim.animate();
		}
	};
}(); 

function switchTemplate(imageID,newImage) {
	var imagePath = document.getElementById(imageID).src;
	var pos = imagePath.lastIndexOf("/");
	var imageName = imagePath.substring(pos+1);
	document.getElementById(imageID).src = imagePath.replace(imageName, newImage);
}

function getTemplateID(target,templateID) {
	//alert(divID);
	document.getElementById(target).value = templateID;
}

function viewTemplate(userID,target) {
	var domain = getDomain(window.location.href);
	if (domain.indexOf('secure')>-1){
		domain=domain.replace(/secure\./,'http://www.');
		var url=domain+"/controlpanel/mywebsites/mywebsite.php?u="+userID+"&t="+document.getElementById(target).value;
	}
	else
	var url="/controlpanel/mywebsites/mywebsite.php?u="+userID+"&t="+document.getElementById(target).value;
	window.open(url);
	
}

function viewTemplates(userID,target) {
	
	var url = $('PARTNERURL').value+"/controlpanel/mywebsites/mywebsite.php?u="+userID+"&t="+document.getElementById(target).value;
	window.open(url);
}

function openTemplate(userID,target) { 
	var url="/controlpanel/mywebsites/mywebsite.php?u="+userID+"&t="+target;
	window.open(url);
	
}

function openSampleSite(url) { 
	window.open(url);
	
}

//var winPop = function(){
//var win;
//    
//	return {
//        init : function(){},
//       resetStatus:function() {},
//		show : function(url,title,num){ 
//            if(!win){ 
//				win = new YAHOO.ext.BasicDialog("rsft_win", { 
//				modal:true,	autoTabs:true,width:10,	height:10,shadow:false,minWidth:10,minHeight:10,proxyDrag: false,resizable: false,draggable: false,constraintoviewport: true,fixedcenter:false
//				});
//            }
//				
//			$('rsft_win_title').innerHTML = title;
//
//			
//				//win.resizeTo(752,500);
//				win.resizeTo(457,572);
//				win.moveTo(261,120);
//				//var tabs = win.getTabs();
//				//tabs.unhideTab(0);
//				win.show($('info_'+num));
//				loadPage(url,"rsft_win_body", {width:430,height:570,scroll:1});	
//			
//        },
//		close:function(){win.hide();}
//    };
//}();

var viewsample = function(){
	var img;
	var w;
	var h;
	var last;
	var a=0;
	var newobj;
	var sampleurl;

	return{
		init:function(){
			img = $C("img");
			document.body.appendChild(img);
			img.style.display="none";
			img.style.cursor="pointer";
			var _mouseout = function(){
				var attributes = {
				  width: {to: w},
				  height: {to: h}
				};

				var onComplete = function() {img.style.display="none";a=0;
				if (newobj){viewsample.anim(newobj,sampleurl);}
				}
				var anim = new YAHOO.util.Motion(img, attributes, .1, YAHOO.util.Easing.easeOut);
				anim.onComplete.subscribe(onComplete);
				anim.animate();
			};
			
			var _onclick = function(){
				var newwin = window.open(sampleurl,"newwin");
				newwin.focus();
			};

			YAHOO.util.Event.addListener(img,"click",_onclick);
			YAHOO.util.Event.addListener(img,"mouseout",_mouseout);
		},
		
		anim:function(obj,u){
			sampleurl = u;
			if ( a==1){	if (last != obj){newobj = obj;}return;}
			img.style.display="block";
			YAHOO.util.Dom.setXY(img,YAHOO.util.Dom.getXY(obj));
			w = obj.getAttribute("width");
			h = obj.getAttribute("height");
			img.setAttribute("width",w);
			img.setAttribute("height",h);
			img.setAttribute("border",1);
			img.src = obj.src;
			sampleurl = u;
		    var attributes = {
			  width: {to: 200},
			  height: {to: 170}
		    };

			last=obj;
			var onStart = function() {a = 1;newobj=null;}
			var onComplete = function() {}
		    var anim = new YAHOO.util.Motion(img, attributes, .5, YAHOO.util.Easing.easeOut);
			anim.onStart.subscribe(onStart);
			anim.onComplete.subscribe(onComplete);
			anim.animate();
		},
		close:function(){}
	};
}();

YAHOO.util.Event.addListener(window, "load",viewsample.init);


var popupHelp = function() {
	var helpMessage = {
		'step1_search_assocation':'Please enter  your assocation name',
		'step1_search_mls':'Please enter  your MLS name',
		'step1_search_zip':'Please enter your postal/zip code',
		'step1_search_city':'Please enter your city name',
		'step1_select_mls':'Please select your MLS',
		'step1_account_type':'Please select your account type',
		'step1_agent_id':'Please enter your Agent ID',	
		'step1_office_id':'Please enter your office ID',	
		'step1_account_info':'Please create your username & password',
		'step1_leadsource':'Please select lead source',
		'step2_username':'Please enter a username<br><b><b>e.g. johndoe</b>',
		'step2_password':'Please enter a password<br><b>e.g. password</b>',
		'step2_repassword':'Please retype your password<br><b>e.g. password</b>',
		'step2_reseller_balance':'Your current balance.',
		'step1_Agent_info':'Please enter your profile information',
		'step1_Broker_info':'Please enter your profile information',	
		'step1_salutation':'Please select your salutation<br><b>e.g. Mr.</b>',
		'step1_firstname':'Please enter your first name<br><b>e.g. John</b>',
		'step1_lastname':'Please enter your last name<br><b>e.g. Doe</b>',
		'step1_name':'Please enter your first name and last name<br><b>e.g. John Doe</b>',
		'step1_title':'Please enter your title<br><b>e.g. Broker</b>',
		'step1_email':'Please enter your email address<br><b>e.g. johndoe@yourdomain.com</b>',
		'step1_reemail':'Please retype your email address<br><b>e.g. johndoe@yourdomain.com</b>',
		'step1_tel':'Please enter your telephone number<br><b>e.g. 416-229-9287</b>',
		'step1_cel':'Please enter your cell phone number<br><b>e.g. 416-229-6569</b>',
		'step1_fax':'Please enter your fax number<br><b>e.g. 416-229-1234</b>',
		'step2_office_info':'Please enter your office information',
		'step1_company':'Please enter your company name<br><b>e.g. John Doe Realty Inc.</b>',
		'step2_affiliation':'Please select your affiliation, if your affiliation does not exist, please select other, then enter name below<br><b>e.g. Remax</b>',
		'step1_missing_affiliation':'Please enter the name of your missing affiliation<br><b>e.g. Home Realty Inc.</b>',
		'step1_website':'Please enter your website<br><b>e.g. www.mywebsite.com.</b>',
		'step2_address':'Please enter your address<br><b>e.g. 123 Main Street. Suite 225</b>',
		'step2_country':'Please select your country name<br><b>e.g. United States</b>',
		'step2_state':'Please select your state name<br><b>e.g. California</b>',
		'step2_county':'Please select your country name<br><b>e.g. Orange County</b>',
		'step2_city':'Please select your city name<br><b>e.g. Irvine</b>',
		'step1_missing_city':'Please enter the name of your missing city<br><b>e.g. Juselin</b>',
		'step2_postalcode':'Please enter your Zip / Postal Code<br><b>e.g. 90210</b>',
		'step1_officephone':'Please enter your telephone number<br><b>e.g. 416-229-9287</b>',
		'step1_officeemail':'Please enter your email address<br><b>e.g. info@yourdomain.com</b>',
		'step1_officefax':'Please enter your fax number<br><b>e.g. 416-229-1234</b>',
		'step1_privacy':'Please review our Terms & Conditions then select check box to continue',
		'step1_referral':'Please enter your referral number<br><b>e.g. 3408</b>',
		'step1_template':'Please select a template',

		'step2_subscription_option':'Please select your subscription frequency. You can pay monthly, quarterly, bi-annually or annually',
		'step2_subscription_MONTHLY':'Please select if your would like to pay monthly',
		'step2_subscription_QUARTERLY ':'Please select if your would like to pay quarterly (5% Discount)',
		'step2_subscription_BI-ANNUALLY ':'Please select if your would like to pay bi-annually (10% Discount)',
		'step2_subscription_ANNUALLY ':'Please select if your would like to pay annually (15% Discount)',
		'step2_setup_fee':'One time setup fee applies to all new registrations',
		'step2_ccinfo':'Please enter your credit card information below. Our Secure Socket Layer (SSL) software is the industry standard and among the best software available today for secure commerce transactions. It encrypts all of your personal information including credit card number, name, and address, so that it cannot be read as the information travels over the internet.',
		'step2_cctype':'Please select your payment type<br><b>e.g. Visa</b>',
		'step2_ccnumber':'Please enter your credit card number<br><b>e.g. 4200-4242-4242-4242</b>',
		'step2_ccexpiry':'Please select your expiry date<br><b>e.g. May 2012</b>',
		'step2_ccholder':'Please enter card holder\'s name below<br><b>e.g. John Doe</b>',
		'step2_term1':'Please indicate your acceptance',
		'step2_term2':'Please indicate your acceptance',
		'step2_term3':'Please indicate your acceptance',
		
		'UserNameHelp':'Please enter your username<br><b>e.g. johndoe</b>',
		'PasswordHelp':'Please enter your password<br><b>e.g. password</b>',
		'RememberMeHelp':'If you would like our site to remember your username please check this box',
		
		'cancellation_username':'Please enter your username<br><b>e.g. johndoe</b>',
		'cancellation_password':'Please enter your password<br><b>e.g. password</b>',
		'cancellation_reason':'Please enter your reason of cancellation',
		'cancellation_message':'Please enter your message',

		'idadmin_Upload_Logo':'Upload logo',
		'idadmin_Add_Free_Month_Credit':'Add free month credit',
		'idadmin_Change_MX_Records':'Change MX records',
		'idadmin_Change_Office_Name':'Change office name',
		'idadmin_Remove_Domain_Name_From_CP':'Remove domain name from CP',
		'idadmin_Change_Powered_By_Status':'Change power by status'

	};

	return {
		open:function(obj){
			alertMessage.show({msg:helpMessage[obj.id],title:'Help',adjustX:25},obj);
		},
		close:function(){alertMessage.close();}
	}
}();