function WhichVoIP_FP_swapImg() {//v1.0
 var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array(); for(n=2; n<args.length;
 n+=2) { elm=WhichVoIP_FP_getObjectByID(args[n]); if(elm) { doc.$imgSwaps[doc.$imgSwaps.length]=elm;
 elm.$src=elm.src; elm.src=args[n+1]; } }
}

function WhichVoIP_FP_preloadImgs() {//v1.0
 var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array();
 for(var i=0; i<a.length; i++) { d.FP_imgs[i]=new Image; d.FP_imgs[i].src=a[i]; }
}

function WhichVoIP_FP_getObjectByID(id,o) {//v1.0
 var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id);
 else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;
 if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c)
 for(n=0; n<c.length; n++) { el=WhichVoIP_FP_getObjectByID(id,c[n]); if(el) return el; }
 f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
 for(m=0; m<els.length; m++){ el=WhichVoIP_FP_getObjectByID(id,els[n]); if(el) return el; } }
 return null;
}

function WhichVoIP_LogDisplay()
{
	var display_url = "http://www.whichvoip.com/voip/partner/partner_search.php?cmd=display";
	
	// Add Telebay ID
	display_url += "&telebay=";
	if ( whichvoip_telebay_affiliate_id == "" )
	{
		display_url += "NULL";
	}
	else
	{
		display_url += whichvoip_telebay_affiliate_id;
	}
	
	// Add location
	display_url += "&location=";
	display_url += location.href;
	
	document.write('<img src="' + display_url + '" height="0" width="0">');
}

function WhichVoIP_DoSearch(form, search_type, option_type)
{
	var search_url = "http://www.whichvoip.com/voip/partner/partner_search.php?cmd=search";
	
	// Add Telebay ID
	search_url += "&telebay=";
	if ( whichvoip_telebay_affiliate_id == "" )
	{
		search_url += "NULL";
	}
	else
	{
		search_url += whichvoip_telebay_affiliate_id;
	}
	
	// Add search query
	search_url += "&id=";
	if ( search_type == "residential" )
	{
		// Doing residential search
		// Using radio buttons		
		if ( ((option_type == "radio") && (form.Specials.checked == true )) ||
		     ((option_type == "dropdown") && (form.type.selectedIndex == 2)) )
		{
			search_url += "http://www.whichvoip.com/cgi-bin/search.pl?q=specialyes%2Bpublish_yes%26db=1%26t=10%26s=156"
			//search_url += "http://www.whichvoip.com/cgi-bin/search.pl?q=sunrocket_alt%2Bpublish_yes%26db=1%26t=10%26s=156"
		}
		else if ( ((option_type == "radio") && ( form.AdvancedSearch.checked == true )) ||
		          ((option_type == "dropdown") && (form.type.selectedIndex == 4)) )
		{
			search_url += "http://www.whichvoip.com/voip/voip_providers_feat_all.htm";
		}
		else
		{
			search_url += form.search[form.search.selectedIndex].value;
		}
	}
	else
	{
		search_url += form.search[form.search.selectedIndex].value;
	}
		
	// Add location
	search_url += "&location=";
	search_url += location.href;

	// Add additional information
	if ( search_url != "" )
	{
		window.location = search_url;
	}
}

function WhichVoIP_OptionProvider(form, search_type, option_type) 
{
	for(i = form.search.length - 1; i >= 0; i--)
			form.search.options[i]	= null;

	if ( search_type == "residential" )
	{
		if ( option_type == "radio" )
		{
		    form.LocalLong.checked = false;
		    form.Specials.checked = false;
		    form.AdvancedSearch.checked = false;
		}
	    form.search.disabled = false;
			    
		form.search.options[0] = new Option("Select Provider Plans...", "http://www.whichvoip.com/cgi-bin/search.pl?q=ALL%2Bpublish_yes%26db=1%26t=3%26s=156");
		form.search.options[1] = new Option("All Providers", "http://www.whichvoip.com/cgi-bin/search.pl?q=ALL%2Bpublish_yes%26db=1%26t=3%26s=156");
		form.search.options[2] = new Option("CallCentric", "http://www.whichvoip.com/cgi-bin/search.pl?q=callcentric%2Bworld%2Bpublish_yes%26db=1%26t=3%26s=156");
		form.search.options[3] = new Option("ITP", "http://www.whichvoip.com/cgi-bin/search.pl?q=itp%2Bpublish_yes%26db=1%26t=3%26s=156");
		form.search.options[4] = new Option("PhonePower", "http://www.whichvoip.com/cgi-bin/search.pl?q=PhonePower%2Bpublish_yes%26db=1%26t=3%26s=156");
		form.search.options[5] = new Option("ViaTalk", "http://www.whichvoip.com/cgi-bin/search.pl?q=Viatalk%2Bpublish_yes%26db=1%26t=3%26s=156");
		form.search.options[6] = new Option("VYLMedia", "http://www.whichvoip.com/cgi-bin/search.pl?q=voipyourlife%2Bbasic%2Bpublish_yes%26db=1%26t=3%26s=156");			
	}
	else
	{
		if ( option_type == "radio" )
		{
		    form.BusinessSize.checked = false;
		}
	    
		form.search.options[0] = new Option("Select Provider Plans...", "http://www.whichvoip.com/cgi-bin/search.pl?q=ALL%2Bpublish_yes%26db=2%26t=8%26s=195");
		form.search.options[1] = new Option("All Providers", "http://www.whichvoip.com/cgi-bin/search.pl?q=ALL%2Bpublish_yes%26db=2%26t=8%26s=195");
		form.search.options[2] = new Option("8x8", "http://www.whichvoip.com/index_business.html");
		form.search.options[3] = new Option("Clarity", "http://www.whichvoip.com/index_business.html");
		form.search.options[4] = new Option("EasyOfficePhone", "http://www.whichvoip.com/index_business.html");
		form.search.options[5] = new Option("GlobalPhone", "http://www.whichvoip.com/index_business.html");
		form.search.options[6] = new Option("Jive", "http://www.whichvoip.com/index_business.html");
		form.search.options[7] = new Option("Nextiva", "http://www.whichvoip.com/index_business.html");
		form.search.options[8] = new Option("PhonePower", "http://www.whichvoip.com/index_business.html");
		form.search.options[9] = new Option("Vocalocity", "http://www.whichvoip.com/index_business.html");
		form.search.options[10] = new Option("VYLMedia", "http://www.whichvoip.com/index_business.html");
	}
}

function WhichVoIP_OptionSpecials(form, option_type) 
{
	if ( option_type == "radio" )
	{
	    form.Provider.checked = false;
	    form.LocalLong.checked = false;
	    form.AdvancedSearch.checked = false;
	}
    form.search.disabled = true;
	
	for(i = form.search.length - 1; i >= 0; i--)
			form.search.options[i]	= null;
    
	form.search.options[0] = new Option("View Specials", "View Specials");
}

function WhichVoIP_OptionLocalLong(form, option_type)
{
	if ( option_type == "radio" )
	{
	    form.Provider.checked = false;
	    form.Specials.checked = false;
	    form.AdvancedSearch.checked = false;
	}
    form.search.disabled = false;
	
	for(i = form.search.length - 1; i >= 0; i--)
			form.search.options[i]	= null;
			
	form.search.options[0] = new Option("Select Local/Long Plans", "http://www.whichvoip.com/cgi-bin/search.pl?q=ALL%2Bpublish_yes%26db=1%26t=3%26s=156");

	form.search.options[1] = new Option("All Plans", "http://www.whichvoip.com/cgi-bin/search.pl?q=ALL%2Bpublish_yes%26db=1%26t=3%26s=156");
  	form.search.options[2] = new Option("Local, upto 500 mins", "http://www.whichvoip.com/cgi-bin/search.pl?q=localy%2Bpublish_yes%26db=1%26t=3%26s=156");
	form.search.options[3] = new Option("Local, more than 500 mins", "http://www.whichvoip.com/cgi-bin/search.pl?q=localz%2Bpublish_yes%26db=1%26t=3%26s=156");
	form.search.options[4] = new Option("Long, upto 500 mins", "http://www.whichvoip.com/cgi-bin/search.pl?q=longy%2Bpublish_yes%26db=1%26t=3%26s=156");
	form.search.options[5] = new Option("Long, more than 500 mins", "http://www.whichvoip.com/cgi-bin/search.pl?q=longz%2Bpublish_yes%26db=1%26t=3%26s=156");
}

function WhichVoIP_OptionAdvancedSearch(form, option_type) 
{
	if ( option_type == "radio" )
	{
	    form.Provider.checked = false;
	    form.Specials.checked = false;
	    form.LocalLong.checked = false;
	}
    form.search.disabled = true;
	    
	form.search.options[0] = new Option("Select Specific Features", "Select Specific Features");
	    
	for(i = form.search.length - 1; i >= 0; i--)
			form.search.options[i]	= null;

	form.search.options[0] = new Option("Select Specific Features", "Select Specific Features");
}

function WhichVoIP_OptionBusinessSize(form, option_type) 
{
	if ( option_type == "radio" )
	{
	    form.Provider.checked = false;
	}

	for(i = form.search.length - 1; i >= 0; i--)
			form.search.options[i]	= null;
    
	form.search.options[0] = new Option("Select Business Size", "http://www.whichvoip.com/cgi-bin/search.pl?q=ALL%2Bpublish_yes%26db=2%26t=8%26s=195");

	form.search.options[1] = new Option("All Business Size", "http://www.whichvoip.com/cgi-bin/search.pl?q=ALL%2Bpublish_yes%26db=2%26t=8%26s=195");
  	form.search.options[2] = new Option("Small/Home Office (SOHO)", "http://www.whichvoip.com/cgi-bin/search.pl?q=sohoyes%2Bpublish_yes%26db=2%26t=8%26s=195");
	form.search.options[3] = new Option("Small to Medium sized (SMB)", "http://www.whichvoip.com/cgi-bin/search.pl?q=msbyes%2Bpublish_yes%26db=2%26t=8%26s=195");
	form.search.options[4] = new Option("Large Business", "http://www.whichvoip.com/cgi-bin/search.pl?q=lsbyes%2Bpublish_yes%26db=2%26t=8%26s=195");
}

function WhichVoIP_DropdownChange(form, search_type)
{
	if ( search_type == "residential" )
	{
		// Residential search
		switch (form.type.selectedIndex)
		{
			case 1:
			{
				// Select a service provider
				WhichVoIP_OptionProvider(form, search_type, "dropdown");
				break;
			}
			
			case 2:
			{
				// Select a special
				WhichVoIP_OptionSpecials(form, "dropdown");
				break;
			}
	
			case 3:
			{
				// Select local or long distance
				WhichVoIP_OptionLocalLong(form, "dropdown");
				break;
			}
	
			case 4:
			{
				// Select Advanced search
				WhichVoIP_OptionAdvancedSearch(form, "dropdown");
				break;
			}
		}
	}
	else
	{
		// Business search
		switch (form.type.selectedIndex)
		{
			case 1:
			{
				// Select a service provider
				WhichVoIP_OptionProvider(form, search_type, "dropdown");
				break;
			}
			
			case 2:
			{
				// Select a special
				WhichVoIP_OptionBusinessSize(form, "dropdown");
				break;
			}
		}
	}
}

function WhichVoIP_Init_Residential_Vertical()
{
	// Determine value for form number
	whichvoip_form_count = 0;
	for(form_count = 0; form_count < document.forms.length; form_count++)
	{
		form_name = "WhichVoIP_search" + whichvoip_form_count;
		if ( document.forms[form_count].name == form_name )
		{
			whichvoip_form_count++;
		}
	}
	
	document.write('<table cellpadding="0" cellspacing="0" width="160" height="200">');
	document.write('	<tr>');
	document.write('		<td></td>');
	document.write('		<td valign="middle" height="20" style="background-color: #' + whichvoip_border_color + '">');
	document.write('			<p style="background-color: #' + whichvoip_border_color + '; color:#' + whichvoip_title_color + '; font: 11pt arial, verdana, helvetica, sans-serif; font-weight: bold;" align="center">VoIP Plan Search</p>');
	document.write('		</td>');
	document.write('		</tr>');
	document.write('	<tr>');
	document.write('		<td width="5"></td>');
	document.write('		<td valign="top" height="80" width="160">');
	document.write('			<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">');
	document.write('				<tr>');
	document.write('					<td bgcolor="#' + whichvoip_border_color + '" width="1">');
	document.write('					<img alt="" width="1" height="1" src="http://www.whichvoip.com/images/common/MsSpacer.gif"></td>');
	document.write('					<td valign="top" width="100%">');
	document.write('					<!-- MSCellFormattingType="content" -->');
	document.write('					<br><h1 align="center" style="margin: 0 4px">');
	document.write('					<b><font size="2" face="Arial">Select Type of Search:</font></b></h1>');
	document.write('					<br>');
	document.write('						');
	document.write('					<form name="WhichVoIP_search' + whichvoip_form_count + '">');
	document.write('						<p style="margin-top: -16px">');
	document.write('						<input type="radio" name="Provider" onClick="WhichVoIP_OptionProvider(document.WhichVoIP_search' + whichvoip_form_count + ', \'residential\', \'radio\');" value="Provider" checked></font><font face="Arial" size="2">Specific Provider</font></p>');
	document.write('						<p style="margin-top: -16px">');
	document.write('						<font face="Arial" size="2">');
	document.write('						<input type="radio" name="Specials" onClick="WhichVoIP_OptionSpecials(document.WhichVoIP_search' + whichvoip_form_count + ', \'radio\');"value="Specials">View Specials</font></p>');
	document.write('						<p style="margin-top: -16px">');
	document.write('						<font face="Arial" size="2">');
	document.write('						<input type="radio" name="LocalLong" onClick="WhichVoIP_OptionLocalLong(document.WhichVoIP_search' + whichvoip_form_count + ', \'radio\');"value="LocalLong">Local/Long Distance</font></p>');
	document.write('						<p style="margin-top: -16px">');
	document.write('						<font face="Arial" size="2">');
	document.write('						<input type="radio" name="AdvancedSearch" onClick="WhichVoIP_OptionAdvancedSearch(document.WhichVoIP_search' + whichvoip_form_count + ', \'radio\');" value="AdvancedSearch">Advanced Search');
	document.write('						</p>	');
	document.write('						<p align="center">');
	document.write('						<select name="search" size="1" style="font-size: 8pt; width: 146; letter-spacing:-0">');
	document.write('						</select>');
	document.write('						<br>');
	document.write('						&nbsp;</p>');
	document.write('						<p align="center" style="margin-top: -20px; margin-bottom: -10px">');
	document.write('						<a target=_self href="javascript: WhichVoIP_DoSearch(document.WhichVoIP_search' + whichvoip_form_count + ', \'residential\', \'radio\')">');
	document.write('						<img border="0" id="WhichVoIP_SearchButtonImg' + whichvoip_form_count + '" src="http://www.whichvoip.com/images/voip/buttonA4.jpg" ');
	document.write('							height="30" width="110" alt="Start Plan Search" ');
	document.write('							onmouseover="WhichVoIP_FP_swapImg(1,0,/*id*/\'WhichVoIP_SearchButtonImg' + whichvoip_form_count + '\',/*url*/\'http://www.whichvoip.com/images/voip/buttonA5.jpg\')" ');
	document.write('							onmouseout="WhichVoIP_FP_swapImg(0,0,/*id*/\'WhichVoIP_SearchButtonImg' + whichvoip_form_count + '\',/*url*/\'http://www.whichvoip.com/images/voip/buttonA4.jpg\')" ');
	document.write('							onmousedown="WhichVoIP_FP_swapImg(1,0,/*id*/\'WhichVoIP_SearchButtonImg' + whichvoip_form_count + '\',/*url*/\'http://www.whichvoip.com/images/voip/buttonA6.jpg\')" ');
	document.write('							onmouseup="WhichVoIP_FP_swapImg(0,0,/*id*/\'WhichVoIP_SearchButtonImg' + whichvoip_form_count + '\',/*url*/\'http://www.whichvoip.com/images/voip/buttonA5.jpg\')" ');
	document.write('							fp-style="fp-btn: Embossed Capsule 3; fp-font: Arial; fp-font-style: Bold; fp-font-size: 8; ');
	document.write('								fp-font-color-normal: #263873; fp-font-color-hover: #263873; fp-font-color-press: #DF0000; ');
	document.write('								fp-proportional: 0" ');
	document.write('							fp-title="Start Plan Search" align="center"></a></p>');
	document.write('						<p align="center">');
	document.write('						<a href="http://www.whichvoip.com/voip/partner/partner_redirect.php?id=http://www.whichvoip.com/voip/visit_site.php?id=phonepower_unlimited" target=_blank>');
	document.write('							<img border="0" align=middle src="http://www.whichvoip.com/images/voip/phonepower.gif" width="100" height="36" alt="PhonePower VoIP Service Provider" ></a>');
	document.write('						</p>');
	document.write('		</form>');
	document.write('					');
	document.write('					</td>');
	document.write('					<td bgcolor="#' + whichvoip_border_color + '" height="100%" width="1">');
	document.write('					<img alt="" width="1" height="1" src="http://www.whichvoip.com/images/common/MsSpacer.gif"></td>');
	document.write('				</tr>');
	document.write('				<tr>');
	document.write('					<td bgcolor="#' + whichvoip_border_color + '" colspan="3" height="1">');
	document.write('					<img alt="" width="1" height="1" src="http://www.whichvoip.com/images/common/MsSpacer.gif"></td>');
	document.write('			</table>');
	document.write('		</tr>');
	document.write('</table>');

	// Initialize new drop down
	form_name = "WhichVoIP_search" + whichvoip_form_count;
	for(form_count = 0; form_count < document.forms.length; form_count++)
	{
		if ( document.forms[form_count].name == form_name )
		{
			WhichVoIP_OptionProvider(document.forms[form_count], "residential", "radio"); 
		}
	}
}

function WhichVoIP_Init_Residential_Horizontal728x90()
{
	// Determine value for form number
	whichvoip_form_count = 0;
	for(form_count = 0; form_count < document.forms.length; form_count++)
	{
		form_name = "WhichVoIP_search" + whichvoip_form_count;
		if ( document.forms[form_count].name == form_name )
		{
			whichvoip_form_count++;
		}
	}

	document.write('<table cellpadding="0" cellspacing="0" width="728" height="75">');
	document.write('	<!-- MSTableType="layout" -->');
	document.write('	<tr>');
	document.write('		<td valign="top" height="75" width="598">');
	document.write('		<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">');
	document.write('			<!-- MSCellFormattingTableID="1" -->');
	document.write('			<tr>');
	document.write('				<td bgcolor="#' + whichvoip_border_color + '" colspan="3" height="1">');
	document.write('				<img alt="" width="1" height="1" src="http://www.whichvoip.com/images/common/MsSpacer.gif"></td>');
	document.write('			</tr>');
	document.write('			<tr>');
	document.write('				<td bgcolor="#' + whichvoip_border_color + '" width="1">');
	document.write('				<img alt="" width="1" height="1" src="http://www.whichvoip.com/images/common/MsSpacer.gif"></td>');
	document.write('				<td valign="top" width="100%">');
	document.write('				<!-- MSCellFormattingType="content" -->');
	document.write('				<table border="0" width="100%" cellspacing="0" cellpadding="0" height="73">');
	document.write('	<tr>');
	document.write('		<td valign="middle" align="left" bgcolor="#' + whichvoip_border_color + '" colspan="4" height="15">');
	document.write('			<p style="background-color: #' + whichvoip_border_color + '; color:#' + whichvoip_title_color + '; font: 11pt arial, verdana, helvetica, sans-serif; font-weight: bold;">VoIP Plan Search</p>');	document.write('		</td>');
	document.write('	</tr>');
	document.write('	<form name="WhichVoIP_search' + whichvoip_form_count + '">');
	document.write('	<tr>');
	document.write('		<td valign="middle" align="left" width="24%">');
	document.write('			<input type="radio" name="Provider" onClick="WhichVoIP_OptionProvider(document.WhichVoIP_search' + whichvoip_form_count + ', \'residential\', \'radio\');" value="Provider" checked></font>');
	document.write('			<font face="Arial" size="2">Specific Provider</font>');
	document.write('');
	document.write('		</td>');
	document.write('		<td valign="middle" align="left" width="24%">');
	document.write('			<input type="radio" name="LocalLong" onClick="WhichVoIP_OptionLocalLong(document.WhichVoIP_search' + whichvoip_form_count + ', \'radio\');"value="LocalLong">');
	document.write('			<font face="Arial" size="2">Local/Long Distance</font>');
	document.write('		</td>');
	document.write('		<td width="30%" rowspan="2">');
	document.write('			<p align="center">');
	document.write('					<font face="Arial" size="2">');
	document.write('						<select name="search" size="1" style="font-size: 8pt; width: 146; letter-spacing:-0">');
	document.write('						</select></font></p>');
	document.write('		</td>');
	document.write('		<td valign="middle" align="center" rowspan="2" width="22%">');
	document.write('			<p align="center" style="margin-top: 5px; margin-bottom: 5px">');
	document.write('				<font face="Arial" size="2">');
	document.write('					<a target=_self href="javascript: WhichVoIP_DoSearch(document.WhichVoIP_search' + whichvoip_form_count + ', \'residential\', \'radio\')">');
	document.write('						<img border="0" id="WhichVoIP_SearchButtonImg' + whichvoip_form_count + '" src="http://www.whichvoip.com/images/voip/buttonA4.jpg" ');
	document.write('							height="30" width="110" alt="Start Plan Search" ');
	document.write('							onmouseover="WhichVoIP_FP_swapImg(1,0,/*id*/\'WhichVoIP_SearchButtonImg' + whichvoip_form_count + '\',/*url*/\'http://www.whichvoip.com/images/voip/buttonA5.jpg\')" ');
	document.write('							onmouseout="WhichVoIP_FP_swapImg(0,0,/*id*/\'WhichVoIP_SearchButtonImg' + whichvoip_form_count + '\',/*url*/\'http://www.whichvoip.com/images/voip/buttonA4.jpg\')" ');
	document.write('							onmousedown="WhichVoIP_FP_swapImg(1,0,/*id*/\'WhichVoIP_SearchButtonImg' + whichvoip_form_count + '\',/*url*/\'http://www.whichvoip.com/images/voip/buttonA6.jpg\')" ');
	document.write('							onmouseup="WhichVoIP_FP_swapImg(0,0,/*id*/\'WhichVoIP_SearchButtonImg' + whichvoip_form_count + '\',/*url*/\'http://www.whichvoip.com/images/voip/buttonA5.jpg\')" ');
	document.write('							fp-style="fp-btn: Embossed Capsule 3; fp-font: Arial; fp-font-style: Bold; fp-font-size: 8; fp-font-color-normal: #263873; fp-font-color-hover: #263873; fp-font-color-press: #DF0000; fp-proportional: 0; fp-orig: 0" ');
	document.write('							fp-title="Start Plan Search" align="center"></a></font></td>');
	document.write('		</td>');
	document.write('	</tr>');
	document.write('	<tr>');
	document.write('		<td valign="middle" align="left" height="27" width="24%">');
	document.write('			<input type="radio" name="Specials" onClick="WhichVoIP_OptionSpecials(document.WhichVoIP_search' + whichvoip_form_count + ', \'radio\');"value="Specials">');
	document.write('			<font face="Arial" size="2">View Specials</font>');
	document.write('');
	document.write('		</td>');
	document.write('		<td valign="middle" align="left" height="27" width="24%">');
	document.write('			<input type="radio" name="AdvancedSearch" onClick="WhichVoIP_OptionAdvancedSearch(document.WhichVoIP_search' + whichvoip_form_count + ', \'radio\');" value="AdvancedSearch">');
	document.write('			<font face="Arial" size="2">Advanced Search</font>');
	document.write('		</td>');
	document.write('	</tr>');
	document.write('	</form>');	
	document.write('	</table>');
	document.write('				</td>');
	document.write('				<td bgcolor="#' + whichvoip_border_color + '" height="100%" width="1">');
	document.write('				<img alt="" width="1" height="1" src="http://www.whichvoip.com/images/common/MsSpacer.gif"></td>');
	document.write('			</tr>');
	document.write('			<tr>');
	document.write('				<td bgcolor="#' + whichvoip_border_color + '" colspan="3" height="1">');
	document.write('				<img alt="" width="1" height="1" src="http://www.whichvoip.com/images/common/MsSpacer.gif"></td>');
	document.write('			</tr>');
	document.write('	</table>');
	document.write('	</td>');
	document.write('	<td width="10">&nbsp;</td>');
	document.write('	<td valign="middle" align="center" height="75" width="120">');
	document.write('		<p align="center">');
	document.write('		<a href="http://www.whichvoip.com/voip/partner/partner_redirect.php?id=http://www.whichvoip.com/voip/visit_site.php?id=phonepower_unlimited" target=_blank>');
	document.write('			<img border="0" align=middle src="http://www.whichvoip.com/images/voip/phonepower.gif" width="100" height="36" alt="PhonePower VoIP Service Provider" ></a>');
	document.write('		</p>');
	document.write('	</td>');
	document.write('	</tr>');
	document.write('</table>');

	// Initialize new drop down
	form_name = "WhichVoIP_search" + whichvoip_form_count;
	for(form_count = 0; form_count < document.forms.length; form_count++)
	{
		if ( document.forms[form_count].name == form_name )
		{
			WhichVoIP_OptionProvider(document.forms[form_count], "residential", "radio"); 
		}
	}
}

function WhichVoIP_Init_Residential_Horizontal468x60()
{
	// Determine value for form number
	whichvoip_form_count = 0;
	for(form_count = 0; form_count < document.forms.length; form_count++)
	{
		form_name = "WhichVoIP_search" + whichvoip_form_count;
		if ( document.forms[form_count].name == form_name )
		{
			whichvoip_form_count++;
		}
	}

	document.write('<table cellpadding="0" cellspacing="0" width="468" height="45">');
	document.write('	<!-- MSTableType="layout" -->');
	document.write('	<tr>');
	document.write('		<td valign="top" height="45" width="468">');
	document.write('		<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">');
	document.write('			<!-- MSCellFormattingTableID="3" -->');
	document.write('			<tr>');
	document.write('				<td bgcolor="#' + whichvoip_border_color + '" colspan="3" height="1">');
	document.write('				<img alt="" width="1" height="1" src="http://www.whichvoip.com/http://www.whichvoip.com/images/common/MsSpacer.gif"></td>');
	document.write('			</tr>');
	document.write('			<tr>');
	document.write('				<td bgcolor="#' + whichvoip_border_color + '" width="1">');
	document.write('				<img alt="" width="1" height="1" src="http://www.whichvoip.com/http://www.whichvoip.com/images/common/MsSpacer.gif"></td>');
	document.write('				<td valign="top" width="100%">');
	document.write('				<!-- MSCellFormattingType="content" -->');
	document.write('				<div align="left">');
	document.write('	<table border="0" width="100%" align="left" cellspacing="0" cellpadding="0" height="43">');
	document.write('		<form name="WhichVoIP_search' + whichvoip_form_count + '">');
	document.write('		<tr>');
	document.write('			<td valign="middle" align="center" bgcolor="#' + whichvoip_border_color + '" colspan="3" height="16">');
	document.write('			<p style="background-color: #' + whichvoip_border_color + '; color:#' + whichvoip_title_color + '; font: 11pt arial, verdana, helvetica, sans-serif; font-weight: bold;">VoIP Plan Search</p>');
	document.write('		</tr>');
	document.write('		<tr>');
	document.write('			<td valign="middle" align="center" width="42%"><p align="center">');
	document.write('				<font face="Arial" size="1">Step 1:');
	document.write('						<select name="type" size="1" style="font-size: 8pt; width: 147; letter-spacing:-0; height:18"');
	document.write('							onChange="WhichVoIP_DropdownChange(document.WhichVoIP_search' + whichvoip_form_count + ', \'residential\');">');
	document.write('						    <option value="http://www.whichvoip.com?URL=">Select search type...</option>');
	document.write('							<option value="http://www.whichvoip.com/cgi-bin/search.pl?q=ALL+publish_yes&db=1&t=3&s=156">Specific Provider</option>');
	document.write('							<option value="http://www.whichvoip.com/cgi-bin/search.pl?q=1TouchTone&db=1&t=3&s=156">View Specials</option>');
	document.write('							<option value="http://www.whichvoip.com/cgi-bin/search.pl?q=AT%26T&db=1&t=3&s=156">Local/Long Distance</option>');
	document.write('							<option value="http://www.whichvoip.com/cgi-bin/search.pl?q=Babytel&db=1&t=3&s=156">Advanced Search</option>');
	document.write('						</select></font></p>');
	document.write('			</td>');
	document.write('			<td valign="middle" align="center" width="44%"><p align="center">');
	document.write('				<font face="Arial" size="1">Step 2:');
	document.write('						<select name="search" size="1" style="font-size: 8pt; width: 147; letter-spacing:-0; height:18">');
	document.write('						</select></font></p>');
	document.write('			</td>');
	document.write('			<td valign="middle" align="center" width="14%"><p align="center">');
	document.write('				<a target=_self href="javascript: WhichVoIP_DoSearch(document.WhichVoIP_search' + whichvoip_form_count + ', \'residential\', \'dropdown\')">');
	document.write('				<img border="0" id="WhichVoIP_SearchButtonImg' + whichvoip_form_count + '" src="http://www.whichvoip.com/images/voip/search_buttonA.jpg" ');
	document.write('					height="18" width="57" alt="Search" ');
	document.write('					onmouseover="WhichVoIP_FP_swapImg(1,0,/*id*/\'WhichVoIP_SearchButtonImg' + whichvoip_form_count + '\',/*url*/\'http://www.whichvoip.com/images/voip/search_buttonB.jpg\')" ');
	document.write('					onmouseout="WhichVoIP_FP_swapImg(0,0,/*id*/\'WhichVoIP_SearchButtonImg' + whichvoip_form_count + '\',/*url*/\'http://www.whichvoip.com/images/voip/search_buttonA.jpg\')" ');
	document.write('					onmousedown="WhichVoIP_FP_swapImg(1,0,/*id*/\'WhichVoIP_SearchButtonImg' + whichvoip_form_count + '\',/*url*/\'http://www.whichvoip.com/images/voip/search_buttonC.jpg\')" ');
	document.write('					onmouseup="WhichVoIP_FP_swapImg(0,0,/*id*/\'WhichVoIP_SearchButtonImg' + whichvoip_form_count + '\',/*url*/\'http://www.whichvoip.com/images/voip/search_buttonB.jpg\')" ');
	document.write('					fp-style="fp-btn: Embossed Capsule 3; fp-font: Arial; fp-font-style: Bold; fp-font-size: 8; fp-font-color-normal: #263873; fp-font-color-hover: #263873; fp-font-color-press: #DF0000; fp-proportional: 0; fp-orig: 0" ');
	document.write('					fp-title="Search" align="center">');
	document.write('				</a></p>');
	document.write('			</td>');
	document.write('		</tr>');
	document.write('		</form>');	
	document.write('		</table>');
	document.write('				</div>');
	document.write('				</td>');
	document.write('				<td bgcolor="#' + whichvoip_border_color + '" height="100%" width="1">');
	document.write('				<img alt="" width="1" height="1" src="http://www.whichvoip.com/images/common/MsSpacer.gif"></td>');
	document.write('			</tr>');
	document.write('			<tr>');
	document.write('				<td bgcolor="#' + whichvoip_border_color + '" colspan="3" height="1">');
	document.write('				<img alt="" width="1" height="1" src="http://www.whichvoip.com/images/common/MsSpacer.gif"></td>');
	document.write('			</tr>');
	document.write('		</table>');
	document.write('		</td>');
	document.write('		</tr>');
	document.write('</table>');

	// Initialize new drop down
	form_name = "WhichVoIP_search" + whichvoip_form_count;
	for(form_count = 0; form_count < document.forms.length; form_count++)
	{
		if ( document.forms[form_count].name == form_name )
		{
		    document.forms[form_count].search.disabled = false;
		}
	}
}

function WhichVoIP_Init_Business_Vertical()
{
	// Determine value for form number
	whichvoip_form_count = 0;
	for(form_count = 0; form_count < document.forms.length; form_count++)
	{
		form_name = "WhichVoIP_search" + whichvoip_form_count;
		if ( document.forms[form_count].name == form_name )
		{
			whichvoip_form_count++;
		}
	}

	document.write('<table cellpadding="0" cellspacing="0" width="160" height="200">');
	document.write('	<tr>');
	document.write('		<td></td>');
	document.write('		<td valign="middle" height="20" style="background-color: #' + whichvoip_border_color + '">');
	document.write('			<p style="background-color: #' + whichvoip_border_color + '; color:#' + whichvoip_title_color + '; font: 11pt arial, verdana, helvetica, sans-serif; font-weight: bold;" align="center">VoIP Plan Search</p>');
	document.write('		</td>');
	document.write('		</tr>');
	document.write('	<tr>');
	document.write('		<td width="5"></td>');
	document.write('		<td valign="top" height="80" width="160">');
	document.write('			<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">');
	document.write('				<tr>');
	document.write('					<td bgcolor="#' + whichvoip_border_color + '" width="1">');
	document.write('					<img alt="" width="1" height="1" src="http://www.whichvoip.com/images/common/MsSpacer.gif"></td>');
	document.write('					<td valign="top" width="100%">');
	document.write('					<!-- MSCellFormattingType="content" -->');
	document.write('					<br><h1 align="center" style="margin: 0 4px">');
	document.write('					<b><font size="2" face="Arial">Select Type of Search:</font></b></h1>');
	document.write('					<br>');
	document.write('						');
	document.write('					<form name="WhichVoIP_search' + whichvoip_form_count + '">');
	document.write('						<p style="margin-top: -16px">');
	document.write('						<input type="radio" name="Provider" onClick="WhichVoIP_OptionProvider(document.WhichVoIP_search' + whichvoip_form_count + ', \'business\', \'radio\');" value="Provider" checked></font><font face="Arial" size="2">Specific Provider</font></p>');
	document.write('						<p style="margin-top: -16px">');
	document.write('						<font face="Arial" size="2">');
	document.write('						<input type="radio" name="BusinessSize" onClick="WhichVoIP_OptionBusinessSize(document.WhichVoIP_search' + whichvoip_form_count + ', \'radio\');" value="Business Size">Business Size</font></p>');
	document.write('						<p align="center">');
	document.write('						<select name="search" size="1" style="font-size: 8pt; width: 146; letter-spacing:-0">');
	document.write('						</select>');
	document.write('						<br>');
	document.write('						&nbsp;</p>');
	document.write('						<p align="center" style="margin-top: -20px; margin-bottom: -10px">');
	document.write('						<a target=_self href="javascript: WhichVoIP_DoSearch(document.WhichVoIP_search' + whichvoip_form_count + ', \'business\', \'radio\')">');
	document.write('						<img border="0" id="WhichVoIP_SearchButtonImg' + whichvoip_form_count + '" src="http://www.whichvoip.com/images/voip/buttonA4.jpg" ');
	document.write('							height="30" width="110" alt="Start Plan Search" ');
	document.write('							onmouseover="WhichVoIP_FP_swapImg(1,0,/*id*/\'WhichVoIP_SearchButtonImg' + whichvoip_form_count + '\',/*url*/\'http://www.whichvoip.com/images/voip/buttonA5.jpg\')" ');
	document.write('							onmouseout="WhichVoIP_FP_swapImg(0,0,/*id*/\'WhichVoIP_SearchButtonImg' + whichvoip_form_count + '\',/*url*/\'http://www.whichvoip.com/images/voip/buttonA4.jpg\')" ');
	document.write('							onmousedown="WhichVoIP_FP_swapImg(1,0,/*id*/\'WhichVoIP_SearchButtonImg' + whichvoip_form_count + '\',/*url*/\'http://www.whichvoip.com/images/voip/buttonA6.jpg\')" ');
	document.write('							onmouseup="WhichVoIP_FP_swapImg(0,0,/*id*/\'WhichVoIP_SearchButtonImg' + whichvoip_form_count + '\',/*url*/\'http://www.whichvoip.com/images/voip/buttonA5.jpg\')" ');
	document.write('							fp-style="fp-btn: Embossed Capsule 3; fp-font: Arial; fp-font-style: Bold; fp-font-size: 8; ');
	document.write('								fp-font-color-normal: #263873; fp-font-color-hover: #263873; fp-font-color-press: #DF0000; ');
	document.write('								fp-proportional: 0" ');
	document.write('							fp-title="Start Plan Search" align="center"></a></p>');
	document.write('						<p align="center">');
	document.write('						<a href="http://www.whichvoip.com/voip/partner/partner_redirect.php?id=http://www.whichvoip.com/voip/visit_site.php?id=bandwidth_free_t1" target=_blank>');
	document.write('							<img border="0" align=middle src="http://www.whichvoip.com/images/voip/bandwidth_120x60.gif" width="120" height="60" alt="Free T1 for One Year at Bandwidth.com" ></a>');
	document.write('						</p>');
	document.write('		</form>');
	document.write('					');
	document.write('					</td>');
	document.write('					<td bgcolor="#' + whichvoip_border_color + '" height="100%" width="1">');
	document.write('					<img alt="" width="1" height="1" src="http://www.whichvoip.com/images/common/MsSpacer.gif"></td>');
	document.write('				</tr>');
	document.write('				<tr>');
	document.write('					<td bgcolor="#' + whichvoip_border_color + '" colspan="3" height="1">');
	document.write('					<img alt="" width="1" height="1" src="http://www.whichvoip.com/images/common/MsSpacer.gif"></td>');
	document.write('			</table>');
	document.write('		</tr>');
	document.write('</table>');

	// Initialize new drop down
	form_name = "WhichVoIP_search" + whichvoip_form_count;
	for(form_count = 0; form_count < document.forms.length; form_count++)
	{
		if ( document.forms[form_count].name == form_name )
		{
			WhichVoIP_OptionProvider(document.forms[form_count], "business"); 
		}
	}
}

function WhichVoIP_Init_Business_Horizontal728x90()
{
	// Determine value for form number
	whichvoip_form_count = 0;
	for(form_count = 0; form_count < document.forms.length; form_count++)
	{
		form_name = "WhichVoIP_search" + whichvoip_form_count;
		if ( document.forms[form_count].name == form_name )
		{
			whichvoip_form_count++;
		}
	}

	document.write('<table cellpadding="0" cellspacing="0" width="728" height="75">');
	document.write('	<!-- MSTableType="layout" -->');
	document.write('	<tr>');
	document.write('		<td valign="top" height="75" width="598">');
	document.write('		<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">');
	document.write('			<!-- MSCellFormattingTableID="1" -->');
	document.write('			<tr>');
	document.write('				<td bgcolor="#' + whichvoip_border_color + '" colspan="3" height="1">');
	document.write('				<img alt="" width="1" height="1" src="http://www.whichvoip.com/images/common/MsSpacer.gif"></td>');
	document.write('			</tr>');
	document.write('			<tr>');
	document.write('				<td bgcolor="#' + whichvoip_border_color + '" width="1">');
	document.write('				<img alt="" width="1" height="1" src="http://www.whichvoip.com/images/common/MsSpacer.gif"></td>');
	document.write('				<td valign="top" width="100%">');
	document.write('				<!-- MSCellFormattingType="content" -->');
	document.write('				<table border="0" width="100%" cellspacing="0" cellpadding="0" height="73">');
	document.write('	<tr>');
	document.write('		<td valign="middle" align="left" bgcolor="#' + whichvoip_border_color + '" colspan="4" height="15">');
	document.write('			<p style="background-color: #' + whichvoip_border_color + '; color:#' + whichvoip_title_color + '; font: 11pt arial, verdana, helvetica, sans-serif; font-weight: bold;">VoIP Plan Search</p>');	document.write('		</td>');
	document.write('	</tr>');
	document.write('	<form name="WhichVoIP_search' + whichvoip_form_count + '">');
	document.write('	<tr>');
	document.write('		<td valign="middle" align="left" width="24%">');
	document.write('			<input type="radio" name="Provider" onClick="WhichVoIP_OptionProvider(document.WhichVoIP_search' + whichvoip_form_count + ', \'business\', \'radio\');" value="Provider" checked>');
	document.write('			<font face="Arial" size="2">Specific Provider</font>');
	document.write('');
	document.write('		</td>');
	document.write('		<td valign="middle" align="left" width="24%">');
	document.write('			<input type="radio" name="BusinessSize" onClick="WhichVoIP_OptionBusinessSize(document.WhichVoIP_search' + whichvoip_form_count + ', \'radio\');"value="Business Size">');
	document.write('			<font face="Arial" size="2">Business Size</font>');
	document.write('		</td>');
	document.write('		<td width="30%" rowspan="2">');
	document.write('			<p align="center">');
	document.write('					<font face="Arial" size="2">');
	document.write('						<select name="search" size="1" style="font-size: 8pt; width: 146; letter-spacing:-0">');
	document.write('						</select></font></p>');
	document.write('		</td>');
	document.write('		<td valign="middle" align="center" rowspan="2" width="22%">');
	document.write('			<p align="center" style="margin-top: 5px; margin-bottom: 5px">');
	document.write('				<font face="Arial" size="2">');
	document.write('					<a target=_self href="javascript: WhichVoIP_DoSearch(document.WhichVoIP_search' + whichvoip_form_count + ', \'business\', \'radio\')">');
	document.write('						<img border="0" id="WhichVoIP_SearchButtonImg' + whichvoip_form_count + '" src="http://www.whichvoip.com/images/voip/buttonA4.jpg" ');
	document.write('							height="30" width="110" alt="Start Plan Search" ');
	document.write('							onmouseover="WhichVoIP_FP_swapImg(1,0,/*id*/\'WhichVoIP_SearchButtonImg' + whichvoip_form_count + '\',/*url*/\'http://www.whichvoip.com/images/voip/buttonA5.jpg\')" ');
	document.write('							onmouseout="WhichVoIP_FP_swapImg(0,0,/*id*/\'WhichVoIP_SearchButtonImg' + whichvoip_form_count + '\',/*url*/\'http://www.whichvoip.com/images/voip/buttonA4.jpg\')" ');
	document.write('							onmousedown="WhichVoIP_FP_swapImg(1,0,/*id*/\'WhichVoIP_SearchButtonImg' + whichvoip_form_count + '\',/*url*/\'http://www.whichvoip.com/images/voip/buttonA6.jpg\')" ');
	document.write('							onmouseup="WhichVoIP_FP_swapImg(0,0,/*id*/\'WhichVoIP_SearchButtonImg' + whichvoip_form_count + '\',/*url*/\'http://www.whichvoip.com/images/voip/buttonA5.jpg\')" ');
	document.write('							fp-style="fp-btn: Embossed Capsule 3; fp-font: Arial; fp-font-style: Bold; fp-font-size: 8; fp-font-color-normal: #263873; fp-font-color-hover: #263873; fp-font-color-press: #DF0000; fp-proportional: 0; fp-orig: 0" ');
	document.write('							fp-title="Start Plan Search" align="center"></a></font></td>');
	document.write('		</td>');
	document.write('	</tr>');
	document.write('	</form>');	
	document.write('	</table>');
	document.write('				</td>');
	document.write('				<td bgcolor="#' + whichvoip_border_color + '" height="100%" width="1">');
	document.write('				<img alt="" width="1" height="1" src="http://www.whichvoip.com/images/common/MsSpacer.gif"></td>');
	document.write('			</tr>');
	document.write('			<tr>');
	document.write('				<td bgcolor="#' + whichvoip_border_color + '" colspan="3" height="1">');
	document.write('				<img alt="" width="1" height="1" src="http://www.whichvoip.com/images/common/MsSpacer.gif"></td>');
	document.write('			</tr>');
	document.write('	</table>');
	document.write('	</td>');
	document.write('	<td width="10">&nbsp;</td>');
	document.write('	<td valign="middle" align="center" height="75" width="120">');
	document.write('		<p align="center">');
	document.write('		<a href="http://www.whichvoip.com/voip/partner/partner_redirect.php?id=http://www.whichvoip.com/voip/visit_site.php?id=bandwidth_free_t1" target=_blank>');
	document.write('			<img border="0" align=middle src="http://www.whichvoip.com/images/voip/bandwidth_120x60.gif" width="120" height="60" alt="Free T1 for One Year at Bandwidth.com" ></a>');
	document.write('	</td>');
	document.write('	</tr>');
	document.write('</table>');

	// Initialize new drop down
	form_name = "WhichVoIP_search" + whichvoip_form_count;
	for(form_count = 0; form_count < document.forms.length; form_count++)
	{
		if ( document.forms[form_count].name == form_name )
		{
			WhichVoIP_OptionProvider(document.forms[form_count], "business"); 
		}
	}
}

function WhichVoIP_Init_Business_Horizontal468x60()
{
	// Determine value for form number
	whichvoip_form_count = 0;
	for(form_count = 0; form_count < document.forms.length; form_count++)
	{
		form_name = "WhichVoIP_search" + whichvoip_form_count;
		if ( document.forms[form_count].name == form_name )
		{
			whichvoip_form_count++;
		}
	}

	document.write('<table cellpadding="0" cellspacing="0" width="468" height="45">');
	document.write('	<!-- MSTableType="layout" -->');
	document.write('	<tr>');
	document.write('		<td valign="top" height="45" width="468">');
	document.write('		<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">');
	document.write('			<!-- MSCellFormattingTableID="3" -->');
	document.write('			<tr>');
	document.write('				<td bgcolor="#' + whichvoip_border_color + '" colspan="3" height="1">');
	document.write('				<img alt="" width="1" height="1" src="http://www.whichvoip.com/http://www.whichvoip.com/images/common/MsSpacer.gif"></td>');
	document.write('			</tr>');
	document.write('			<tr>');
	document.write('				<td bgcolor="#' + whichvoip_border_color + '" width="1">');
	document.write('				<img alt="" width="1" height="1" src="http://www.whichvoip.com/http://www.whichvoip.com/images/common/MsSpacer.gif"></td>');
	document.write('				<td valign="top" width="100%">');
	document.write('				<!-- MSCellFormattingType="content" -->');
	document.write('				<div align="left">');
	document.write('	<table border="0" width="100%" align="left" cellspacing="0" cellpadding="0" height="43">');
	document.write('		<form name="WhichVoIP_search' + whichvoip_form_count + '">');
	document.write('		<tr>');
	document.write('			<td valign="middle" align="center" bgcolor="#' + whichvoip_border_color + '" colspan="3" height="16">');
	document.write('			<p style="background-color: #' + whichvoip_border_color + '; color:#' + whichvoip_title_color + '; font: 11pt arial, verdana, helvetica, sans-serif; font-weight: bold;">VoIP Plan Search</p>');
	document.write('		</tr>');
	document.write('		<tr>');
	document.write('			<td valign="middle" align="center" width="42%"><p align="center">');
	document.write('				<font face="Arial" size="1">Step 1:');
	document.write('						<select name="type" size="1" style="font-size: 8pt; width: 147; letter-spacing:-0; height:18"');
	document.write('							onChange="WhichVoIP_DropdownChange(document.WhichVoIP_search' + whichvoip_form_count + ', \'business\');">');
	document.write('						    <option value="http://www.whichvoip.com?URL=">Select search type...</option>');
	document.write('							<option value="http://www.whichvoip.com/cgi-bin/search.pl?q=ALL+publish_yes&db=1&t=3&s=156">Specific Provider</option>');
	document.write('							<option value="http://www.whichvoip.com/cgi-bin/search.pl?q=1TouchTone&db=1&t=3&s=156">Business Size</option>');
	document.write('						</select></font></p>');
	document.write('			</td>');
	document.write('			<td valign="middle" align="center" width="44%"><p align="center">');
	document.write('				<font face="Arial" size="1">Step 2:');
	document.write('						<select name="search" size="1" style="font-size: 8pt; width: 147; letter-spacing:-0; height:18">');
	document.write('						</select></font></p>');
	document.write('			</td>');
	document.write('			<td valign="middle" align="center" width="14%"><p align="center">');
	document.write('				<a target=_self href="javascript: WhichVoIP_DoSearch(document.WhichVoIP_search' + whichvoip_form_count + ', \'business\', \'dropdown\')">');
	document.write('				<img border="0" id="WhichVoIP_SearchButtonImg' + whichvoip_form_count + '" src="http://www.whichvoip.com/images/voip/search_buttonA.jpg" ');
	document.write('					height="18" width="57" alt="Search" ');
	document.write('					onmouseover="WhichVoIP_FP_swapImg(1,0,/*id*/\'WhichVoIP_SearchButtonImg' + whichvoip_form_count + '\',/*url*/\'http://www.whichvoip.com/images/voip/search_buttonB.jpg\')" ');
	document.write('					onmouseout="WhichVoIP_FP_swapImg(0,0,/*id*/\'WhichVoIP_SearchButtonImg' + whichvoip_form_count + '\',/*url*/\'http://www.whichvoip.com/images/voip/search_buttonA.jpg\')" ');
	document.write('					onmousedown="WhichVoIP_FP_swapImg(1,0,/*id*/\'WhichVoIP_SearchButtonImg' + whichvoip_form_count + '\',/*url*/\'http://www.whichvoip.com/images/voip/search_buttonC.jpg\')" ');
	document.write('					onmouseup="WhichVoIP_FP_swapImg(0,0,/*id*/\'WhichVoIP_SearchButtonImg' + whichvoip_form_count + '\',/*url*/\'http://www.whichvoip.com/images/voip/search_buttonB.jpg\')" ');
	document.write('					fp-style="fp-btn: Embossed Capsule 3; fp-font: Arial; fp-font-style: Bold; fp-font-size: 8; fp-font-color-normal: #263873; fp-font-color-hover: #263873; fp-font-color-press: #DF0000; fp-proportional: 0; fp-orig: 0" ');
	document.write('					fp-title="Search" align="center">');
	document.write('				</a></p>');
	document.write('			</td>');
	document.write('		</tr>');
	document.write('		</form>');	
	document.write('		</table>');
	document.write('				</div>');
	document.write('				</td>');
	document.write('				<td bgcolor="#' + whichvoip_border_color + '" height="100%" width="1">');
	document.write('				<img alt="" width="1" height="1" src="http://www.whichvoip.com/images/common/MsSpacer.gif"></td>');
	document.write('			</tr>');
	document.write('			<tr>');
	document.write('				<td bgcolor="#' + whichvoip_border_color + '" colspan="3" height="1">');
	document.write('				<img alt="" width="1" height="1" src="http://www.whichvoip.com/images/common/MsSpacer.gif"></td>');
	document.write('			</tr>');
	document.write('		</table>');
	document.write('		</td>');
	document.write('		</tr>');
	document.write('</table>');

	// Initialize new drop down
	form_name = "WhichVoIP_search" + whichvoip_form_count;
	for(form_count = 0; form_count < document.forms.length; form_count++)
	{
		if ( document.forms[form_count].name == form_name )
		{
		    document.forms[form_count].search.disabled = false;
		}
	}
}


// Ensure values have been set, or use pre-defined defaults
if (typeof whichvoip_telebay_affiliate_id == 'undefined' )
{
	whichvoip_telebay_affiliate_id = whichvoip_affiliate_id;
}
if (typeof whichvoip_search_type == 'undefined')
{
	whichvoip_search_type = "residential";
}
if (typeof whichvoip_layout_type == 'undefined')
{
	whichvoip_layout_type = "vertical160x375"
}
if (typeof whichvoip_border_color == 'undefined')
{
	whichvoip_border_color = "AABFE6";
}
if (typeof whichvoip_title_color == 'undefined')
{
	whichvoip_title_color = "000000";
}

// Determine type of search that is required
switch (whichvoip_search_type)
{
	case "residential":
	{
		// Partner wants residential search
		switch (whichvoip_layout_type)
		{
			case "horizontal728x90":
			{
				// Partner wants horizontal residential search
				WhichVoIP_Init_Residential_Horizontal728x90();
				break;
			}
			
			case "horizontal468x60":
			{
				WhichVoIP_Init_Residential_Horizontal468x60();
				break;
			}
				
			case "vertical160x375":
			default:
			{
				// Partner wants vertical residential search
				WhichVoIP_Init_Residential_Vertical();
				break;
			}
		}
		break;
	}

	case "business":
	{
		// Partner wants business search
		switch (whichvoip_layout_type)
		{
			case "horizontal728x90":
			{
				// Partner wants horizontal residential search
				WhichVoIP_Init_Business_Horizontal728x90();
				break;
			}
			
			case "horizontal468x60":
			{
				WhichVoIP_Init_Business_Horizontal468x60();
				break;
			}
				
			case "vertical160x295":
			default:
			{
				// Partner wants vertical business search
				WhichVoIP_Init_Business_Vertical();
				break;
			}
		}
	}
}

WhichVoIP_LogDisplay();
