File: /home/mykensington.co.uk/public_html/top_tables/site/kensington.js
<!--
// MyVillage Header navigation script
// bazza - 14/7/2001
// domainID = new Array ("www.domainID.co.uk" , "category folder" , "header iamge file location" , "header image alt text" , "special link folder ID" , "image library location" , "message board URL") ,
// *NOTE - Make sure that the last array in the list doesn't have a "," at the end.
all_domains = new Array (
myhollandpark = new Array ("www.myhollandpark.co.uk" , "kensington" , "http://www.mykensington.co.uk/images/hollandparkN.gif" , "MyVillage Holland Park" , "kensington" , "http://www.myvillage.com/top_tables/images/" , "http://www.blackevents.co.uk/cgi-bin/ubbcgi/forumdisplay.cgi?action=topics&forum=My+Kensington&number=20") ,
mykensington = new Array ("www.mykensington.co.uk" , "kensington" , "http://www.mykensington.co.uk/images/kensingtonN.gif" , "MyVillage Kensington" , "nottinghill" , "http://www.myvillage.com/top_tables/images/" , "http://www.blackevents.co.uk/cgi-bin/ubbcgi/forumdisplay.cgi?action=topics&forum=My+Kensington&number=20") ,
myvillage = new Array ("mail.myvillage.com" , "westend" , "../myvillage1netbig.gif" , "MyVillage" , "westend" , "http://www.myvillage.com/top_tables/images/" , "http://www.blackevents.co.uk/cgi-bin/ubbcgi/forumdisplay.cgi?action=topics&forum=My+Westend&number=12") ,
noID = new Array ("www.mynoID.co.uk" , "nottinghilltv" , "http://www.mynottinghill.co.uk/nottinghillN.gif" , "MyVillage Nottinghill" , "nottinghill" , "http://www.myvillage.com/top_tables/images/" , "http://www.blackevents.co.uk/cgi-bin/ubbcgi/forumdisplay.cgi?action=topics&forum=portowebbo&number=19")
);
// setup a new string which has all the domains in
var tempstr = new String (all_domains);
var loc = document.location.search;
var subloc = document.location.hostname;
var domainID = "";
// for testing set these as constants
var personal = 'pages/personal.htm'; // default
// pick out the actual domain ie "myvillage" or whatever
test = subloc.substring(subloc.indexOf(".")+1, subloc.length);
testx = test.substring(test.index, test.indexOf("."));
// Look up the domain and see if it's in the list.
if (eval("tempstr.indexOf('"+testx+"') != -1") && testx != "myvillage")
{
// if it is
// set the domainID to it
domainID = testx;
eval("set_cookie('"+domainID+"');");
} else {
// if it don't exist
check_the_URL();
}
function check_the_URL()
{
// look at the end of the URL to see if it has been passed on
if (loc.indexOf("domain=") != -1)
{
// Coconut complications!!
if (loc.indexOf("_domain") != -1)
{
var chop = loc.substring(loc.indexOf("_domain=")+8, loc.length);
if (chop.indexOf("&") != -1)
{
chopx = chop.substring(chop.index, chop.indexOf("&"));
domainID = chopx.substring(chopx.index, chopx.indexOf("."));
if (domainID.length == 0)
{
domainID = chopx;
eval("set_cookie('"+domainID+"');");
}
if (domainID.length == 0)
{
check_the_cookie();
}
}
else if (chop.indexOf(".") != -1)
{
domainID = chop.substring(chop.index, chop.indexOf("."));
if (domainID.length == 0)
{
check_the_cookie();
}
eval("set_cookie('"+domainID+"');");
}
else
{
domainID = chop;
if (domainID.length == 0)
{
check_the_cookie();
}
eval("set_cookie('"+domainID+"');");
}
}
else
{
// if it is there
// then set domainID to it
var chop = loc.substring(loc.indexOf("domain=")+7, loc.length);
if (chop.indexOf("&") != -1)
{
domainID = chop.substring(chop.index, chop.indexOf("&"));
if (domainID.length == 0)
{
check_the_cookie();
}
eval("set_cookie('"+domainID+"');");
}
else
{
domainID = chop;
if (domainID.length == 0)
{
check_the_cookie();
}
eval("set_cookie('"+domainID+"');");
}
}
}
else
{
// if it's not on the end of the URL
check_the_cookie();
}
}
function check_the_cookie()
{
if (!document.cookie){
// if there is not cookies set
// no choice but to set it to noID
domainID = "noID";
eval("set_cookie('"+domainID+"');");
}
else
{
if (document.cookie.indexOf("domainID=") != -1)
{
// if a cookie is there and it includes a domainID
// use it
var current_cookie = document.cookie.substring(document.cookie.indexOf('domainID=')+9, document.cookie.indexOf('$$$$$$'));
domainID = current_cookie;
eval("set_cookie('"+domainID+"');");
}
else if(document.referrer) {
var str = document.referrer;
var t = str.substring(str.indexOf('.')+1,str.length);
var tt = t.substring(0,t.indexOf('.'));
domainID = tt;
eval("set_cookie('"+domainID+"');");
}
else
{
// if theres a cookie but it doesn't have a domainID
// no choice but to use noID
domainID = "noID";
eval("set_cookie('"+domainID+"');");
}
}
}
// after all this attempt to set a cookie on that server
function set_cookie(domainx)
{
var nextyear = new Date();
nextyear.setFullYear(nextyear.getFullYear() + 1);
if (domainx.length !== 0)
{
document.cookie = "domainID="+ domainx +"$$$$$$;";
eval("draw_table('"+domainx+"');");
}
else
{
}
}
function draw_table(domainx)
{
domainID = domainx
// setup the rest of the variables using the acquired domainID
// the full domain of the current page as specified in the array
domain = eval(domainID+'[0]');
// the name of the folder where all category pages should point for this domain
cat_folder = eval(domainID+'[1]');
// the file name of the header image and caption
header_image = eval(domainID+'[2]');
header_image_caption = eval(domainID+'[3]');
// special link folder - for local sport info etc.
special_links_folder = eval(domainID+'[4]');
// image library directory
image_library = eval(domainID+'[5]');
// message board link
message_board_link = eval(domainID+'[6]');
// from the terraces link
if (! eval(domainID+'[7]'))
{var ftt_link = "http://www.fromtheterrace.co.uk/myvillage/london.asp?domain="+domainID;}
else
{
var tempFTT = eval(domainID+'[7]')
//alert("temp");
var ftt_link = "http://www.fromtheterrace.co.uk/myvillage/"+tempFTT;
}
// Preload the mouseovers
image1 = new Image(165,16);
image1.src = image_library+'navi_arts_on.gif';
image2 = new Image(165,16);
image2.src = image_library+'navi_bars_on.gif';
image3 = new Image(165,16);
image3.src = image_library+'navi_shops_on.gif';
image4 = new Image(165,16);
image4.src = image_library+'navi_services_on.gif';
image5 = new Image(165,16);
image5.src = image_library+'navi_sport_on.gif';
image6 = new Image(165,16);
image6.src = image_library+'navi_community_on.gif';
image7 = new Image(165,16);
image7.src = image_library+'navi_business_on.gif';
image8 = new Image(165,16);
image8.src = image_library+'navi_celebs_on.gif';
image9 = new Image(165,16);
image9.src = image_library+'navi_homes_on.gif';
image10 = new Image(165,16);
image10.src = image_library+'navi_kidsyouth_on.gif';
image11 = new Image(165,16);
image11.src = image_library+'navi_personals_on.gif';
image12 = new Image(165,16);
image12.src = image_library+'navi_fashion_on.gif';
image13 = new Image(165,16);
image13.src = image_library+'navi_restaurants_on.gif';
image14 = new Image(165,16);
image14.src = image_library+'navi_health_on.gif';
image15 = new Image(165,16);
image15.src = image_library+'navi_freetext_on.gif';
image16 = new Image(165,16);
image16.src = image_library+'navi_message_on.gif';
// start writing the top navi bar.
document.write('<!-- Dynamic table present -->');
document.write('<TABLE WIDTH="777" BORDER="0" CELLSPACING="0" CELLPADDING="0" BGCOLOR="#FFCC00" ALIGN="CENTER">');
document.write('<TR>');
document.write('<TD COLSPAN="3" ALIGN="CENTER" BGCOLOR="#000000"> ');
document.write('<table width="100%" border="0" cellpadding="0">');
document.write(' <tr> ');
document.write(' <td colspan="2"> ');
document.write(' <div align="center"><b><font size="1"><a href="http://www.myvillage.com/adrates.htm">Promote ');
document.write(' Your Business</a></font><font color="#000000" size="1">..</font><font size="1" color=white> ');
document.write(' Your local website updated 3 times a week!<font size="1" color="#000000">..</font> ');
document.write(' <a href="http://www.myvillage.com">MyVillage cities ');
document.write(' in the UK</a></font></b><font size="1" color="#000000">..</font><b><font size="1"><a href="http://www.myvillagelondon.co.uk">MyVillage communities in London</a></font></b></td> ');
document.write(' </tr>');
document.write(' </table>');
document.write('</TD>');
document.write('</TR>');
document.write('<TR>');
document.write('<TD VALIGN="TOP" WIDTH="165">');
document.write('<A HREF="http://'+domain+'/'+cat_folder+'/arts.htm" ONMOUSEOVER="document.arts.src=image1.src" ONMOUSEOUT=document.arts.src="'+image_library+'navi_arts.gif"><IMG SRC="'+image_library+'navi_arts.gif" ALT="arts & entertainment" WIDTH="165" HEIGHT="16" BORDER="0" NAME="arts"></A><A HREF="http://'+domain+'/'+cat_folder+'/bars&Music.htm" ONMOUSEOVER="document.bars.src=image2.src" ONMOUSEOUT=document.bars.src="'+image_library+'navi_bars.gif"><IMG SRC="'+image_library+'navi_bars.gif" ALT="bars & music" WIDTH="165" HEIGHT="16" BORDER="0" NAME="bars"></A><A HREF="http://'+domain+'/'+cat_folder+'/shops.htm" ONMOUSEOVER="document.shops.src=image3.src" ONMOUSEOUT=document.shops.src="'+image_library+'navi_shops.gif"><IMG SRC="'+image_library+'navi_shops.gif" ALT="shops" WIDTH="165" HEIGHT="16" BORDER="0" NAME="shops"></A><A HREF="http://'+domain+'/'+cat_folder+'/services.htm" ONMOUSEOVER="document.services.src=image4.src" ONMOUSEOUT=document.services.src="'+image_library+'navi_services.gif"><IMG SRC="'+image_library+'navi_services.gif" ALT="services" WIDTH="165" HEIGHT="16" BORDER="0" NAME="services"></A><A HREF="'+ftt_link+'" ONMOUSEOVER="document.sport.src=image5.src" ONMOUSEOUT=document.sport.src="'+image_library+'navi_sport.gif"><IMG SRC="'+image_library+'navi_sport.gif" ALT="sport" WIDTH="165" HEIGHT="16" BORDER="0" NAME="sport"></A><A HREF="http://'+domain+'/'+cat_folder+'/community.htm" ONMOUSEOVER="document.comm.src=image6.src" ONMOUSEOUT=document.comm.src="'+image_library+'navi_community.gif"><IMG SRC="'+image_library+'navi_community.gif" ALT="community news" WIDTH="165" HEIGHT="16" BORDER="0" NAME="comm"></A><A HREF="http://'+domain+'/'+cat_folder+'/businesszone.htm" ONMOUSEOVER="document.jobs.src=image7.src" ONMOUSEOUT=document.jobs.src="'+image_library+'navi_business.gif"><IMG SRC="'+image_library+'navi_business.gif" ALT="business and finance" WIDTH="165" HEIGHT="16" BORDER="0" NAME="jobs"></A><A HREF="http://www.peoplebank.com/pbank/owa/myvillage.main" ONMOUSEOVER="document.text.src=image15.src" ONMOUSEOUT=document.text.src="'+image_library+'navi_freetext.gif"><IMG SRC="'+image_library+'navi_freetext.gif" ALT="Local and National Jobs" WIDTH="165" HEIGHT="16" BORDER="0" NAME="text"></A>');
document.write('</TD>');
document.write('<TD valign="middle" ALIGN="CENTER" WIDTH="468">');
document.write('<a href="http://' + domain + '"><IMG SRC="'+header_image+'" alt="'+header_image_caption+'"BORDER="0"></a></TD>');
document.write("</td>");
var personals_link = 'http://personals.myvillage.com';
document.write('<TD ALIGN="RIGHT" WIDTH="165" VALIGN="TOP"><A HREF="http://'+domain+'/'+cat_folder+'/celebs&gossip.htm" ONMOUSEOVER="document.celeb.src=image8.src" ONMOUSEOUT=document.celeb.src="'+image_library+'navi_celebs.gif"><IMG SRC="'+image_library+'navi_celebs.gif" ALT="celebs & gossip" WIDTH="165" HEIGHT="16" BORDER="0" NAME="celeb"></A><A HREF="http://'+domain+'/'+cat_folder+'/property.html" ONMOUSEOVER="document.homes.src=image9.src" ONMOUSEOUT=document.homes.src="'+image_library+'navi_homes.gif"><IMG SRC="'+image_library+'navi_homes.gif" ALT="homes & property" WIDTH="165" HEIGHT="16" BORDER="0" NAME="homes"></A><A HREF="http://'+domain+'/'+cat_folder+'/kids.htm" ONMOUSEOVER="document.kids.src=image10.src" ONMOUSEOUT=document.kids.src="'+image_library+'navi_kidsyouth.gif"><IMG NAME="kids" BORDER="0" SRC="'+image_library+'navi_kidsyouth.gif" WIDTH="165" HEIGHT="16"></A><A HREF="' + personals_link + '" ONMOUSEOVER="document.personal.src=image11.src" ONMOUSEOUT=document.personal.src="'+image_library+'navi_personals.gif"><IMG SRC="'+image_library+'navi_personals.gif" ALT="personals" WIDTH="165" HEIGHT="16" BORDER="0" NAME="personal"></A><A HREF="http://'+domain+'/'+cat_folder+'/fashion.htm" ONMOUSEOVER="document.fashion.src=image12.src" ONMOUSEOUT=document.fashion.src="'+image_library+'navi_fashion.gif"><IMG SRC="'+image_library+'navi_fashion.gif" ALT="fashion & lifestyle" WIDTH="165" HEIGHT="16" BORDER="0" NAME="fashion"></A><A HREF="http://'+domain+'/'+cat_folder+'/restaurants.htm" ONMOUSEOVER="document.restaurants.src=image13.src" ONMOUSEOUT=document.restaurants.src="'+image_library+'navi_restaurants.gif"><IMG SRC="'+image_library+'navi_restaurants.gif" ALT="restaurants" WIDTH="165" HEIGHT="16" BORDER="0" NAME="restaurants"></A><A HREF="http://'+domain+'/'+cat_folder+'/health.htm" ONMOUSEOVER="document.trans.src=image14.src" ONMOUSEOUT=document.trans.src="'+image_library+'navi_health.gif"><IMG SRC="'+image_library+'navi_health.gif" ALT="health" WIDTH="165" HEIGHT="16" BORDER="0" NAME="trans"></A><BR>');
document.write('<A HREF="'+message_board_link+'" ONMOUSEOVER="document.message.src=image16.src" ONMOUSEOUT=document.message.src="'+image_library+'navi_message.gif"><IMG SRC="'+image_library+'navi_message.gif" ALT="have your shout!" WIDTH="165" HEIGHT="16" NAME="message" BORDER="0"></A></TD>');
document.write('</TR>');
document.write('</TABLE>');
}
// Other functions
// add local sports links to FTT pages
function show_sports_links()
{
document.writeln('<FONT COLOR="ffcc00" SIZE="1"><B>');
document.writeln('<A HREF="http://'+domain+'/'+cat_folder+'/sport-club.htm">Local club listings</A><BR>');
document.writeln('<A HREF="http://'+domain+'/'+cat_folder+'/sport-activity.htm">Local sports activities</A><BR>');
document.writeln('<A HREF="http://'+domain+'/'+cat_folder+'/sport-features.htm">Local sport features</A><BR>');
document.writeln('</B></FONT>');
}
function make_home()
{
document.writeln('<a href="#" onClick="this.style.behavior=\'url(#default#homepage)\';this.setHomePage(\'http://'+domain+'\');"> ');
document.writeln('<img src="http://www.mybrixton.com/images/make_this_home.gif" alt="Make this your homepage" border="0"');
document.writeln(' width="93" height="40"></a>');
}
// Find a Property additions
function finda(form_name)
{
if (!form_name)
{
//alert("default");
formx = "findit";
}
else
{
//alert(form_name);
formx = form_name;
}
//alert(document.findit.domain.value);
eval("document."+formx+".domain.value = domainID;");
//alert(document.findit.domain.value);
}
function formdestination(mode)
{
if (mode=="mail_coconut")
{
username = new String(document.tripleform.loginname.value);
{myemaildomain=username.substring(username.indexOf('@')+1,username.length);
realusername=username.substring(username[0],username.indexOf('@'));}
var password=document.tripleform.loginpassword.value;
if (callingURL.indexOf("/pages/personal") != -1)
{
location.href='http://mail.myvillage.com/cgi/cwpro/login?fm_submit=yes&fm_referer=index&fm_templates=personals&fm_user_profile=yes&fm_username='+realusername+'&fm_password='+password+'&fm_email_domain='+myemaildomain;
}
else
{
location.href='http://mail.myvillage.com/cgi/cwpro/login?fm_submit=yes&fm_referer=index&fm_templates=&fm_user_profile=yes&fm_username='+realusername+'&fm_password='+password+'&fm_email_domain='+myemaildomain;
}
}
if (mode=="mail_zzn")
{document.tripleform.action="http://portowebbo.zzn.com/email/english/login/loginaction.asp";
document.tripleform.method="POST";
document.tripleform.submit()
}
if (mode=="poll")
{document.tripleform.action="http://test.myvillage.com/testmyvillage/GC/Global/MVViewPollResults.ghtml";
document.tripleform.method="POST";
document.tripleform.submit()}
if (mode=="search")
{document.tripleform.action="http://search.atomz.com/search/";
document.tripleform.method="GET";
document.tripleform.submit()}
}
function right_link()
{
document.writeln("<b><a href='http://mail.myvillage.com/cgi/cwpro/register?fm_templates=personals&fm_email_domain="+domainID+"'>your free Myvillage account here.</a></b>");
}
function network_link(linkx)
{
if (linkx.indexOf("?") != -1)
{
temp = linkx+"&domain="+domainID;
document.location.href = temp;
}
else
{
temp = linkx+"?domain="+domainID;
document.location.href = temp;
}
}
//-->