function DynamicPhoneCompareString(search_str,regularexp,returnvalue)
{
	if( typeof returnvalue == 'undefined' )
	returnvalue = '1';
	var rExp=new RegExp(regularexp,'gi');
	var url = search_str;
	if( rExp.test(url) )
	return returnvalue;
	return '';
} 
if( DynamicPhoneCompareString(self.location.href,'www.collegesurfing.com/blank/|affiliate.collegesurfing.com|careerschoolmatch.com','yes') == 'yes' )
{
	if( typeof (DEFINE_AJAX)=="undefined")
	{
		document.write("<scr"+"ipt language=\"JavaScript\" type=\"text/javascript\" src=\"/js/Ajax.class.js\"></scr"+"ipt>");
	}
	/************ CHECK TO SEE IF THE FUNCTION addLoadEvent IS A  FUNCTION IF NOT IT WILL DECLARE IT **********/
	if( typeof addLoadEvent != 'function' )
	{
		function addLoadEvent(func){var oldonload = window.onload;if (typeof window.onload != 'function'){window.onload = func;} else {window.onload = function(){if (oldonload) {oldonload();}func();}}}
	}
	if( typeof getcookie != 'function' )
	{
		function getcookie(cookiename) {
			var cookiestring=""+document.cookie;
			var index1=cookiestring.indexOf(cookiename);
			if (index1==-1 || cookiename=="") return "";
			var index2=cookiestring.indexOf(';',index1);
			if (index2==-1) index2=cookiestring.length;
			return unescape(cookiestring.substring(index1+cookiename.length+1,index2));
		}
	}
	/*************************************************END******************************************************/
	
	function GetDynamicPhone()
	{
				if( getcookie('AFF_ID') != '' )
		{
			var CampaignPhone = new Ajax();
			CampaignPhone.setReceivedFunction(LoadPhoneByCampaignID);
			CampaignPhone.run("/js/dynamic_campaign_phone.php", "id="+getcookie('AFF_ID'), "GET", true, true);
		}
	}
	function LoadPhoneByCampaignID(obj)
	{
		if( obj.responseText != '' )
		{
			var DPSpacer = document.createElement("div");
			DPSpacer.id = "DynamicPhoneSpaceHolder";
			DPSpacer.innerHTML = '<!-- -->';
			document.body.appendChild(DPSpacer);
			
			var DPPhoneText = document.createElement("div");
			DPPhoneText.id = "DynamicPhonePlacement";
			DPPhoneText.setAttribute("class","DynamicPhonePlacement");
			DPPhoneText.innerHTML = obj.responseText;
			document.body.appendChild(DPPhoneText);
		}
	}
	var DynamicPhoneCSS = '<style type="text/css">'+"\n"+
		'	#DynamicPhoneSpaceHolder'+"\n"+
		'	{'+"\n"+
		'		height: 35px;'+"\n"+
		'	}'+"\n"+
		'	#DynamicPhonePlacement{'+"\n"+
		'		position:absolute;'+"\n"+
		'		bottom:0px;'+"\n"+
		'		left:0px;'+"\n"+
		'		width:100%;'+"\n"+
		'		height:20px;'+"\n"+
		'		border-top:1px solid #000000;'+"\n"+
		'		clear:left;'+"\n"+
		'		color:#1F3A68;'+"\n"+
		'		font-size:11px;'+"\n"+
		'		line-height:18px;'+"\n"+
		'		margin-top:10px;'+"\n"+
		'		padding:10px 5px 5px;'+"\n"+
		'		text-align:center;'+"\n"+
		'		background-color:#FFFFFF;'+"\n"+
		'	}'+"\n"+
		'	body > div#DynamicPhonePlacement { position: fixed; }'+"\n"+
		'</style>'+"\n"+
		'<!--[if gte IE 5.5]>'+"\n"+
		'<style type="text/css">'+"\n"+
		'	div#DynamicPhonePlacement {'+"\n"+
		'		position:absolute;'+"\n"+
		'		right: auto; /*bottom: auto;*/'+"\n"+
		'		left: 0;'+"\n"+
		'		top: expression( ( -10 - DynamicPhonePlacement.offsetHeight + ( document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + \'px\' );'+"\n"+
		'	}'+"\n"+
		'</style>'+"\n"+
		'<![endif]-->';
	document.write(DynamicPhoneCSS);
	addLoadEvent(GetDynamicPhone);
}

