
<!-- Begin function for opening a window - arg 1 is url, arg 2 is (arbitrary) name, args 3&4 are width & height, arg 5 is scrollbars required (yes or no)
var win=null;
function NewWindow(mypage,myname,w,h,scroll)
{
myleft=(screen.width)?(screen.width-w)/2:100;
mytop=(screen.height)?(screen.height-h)/2:100;
settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=" + scroll + ",location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes";
win=window.open(mypage,myname,settings);
win.focus();
}
// End -->

<!-- Begin function for resizing enlargement screens - arg 1 is required width, arg 2 is required height

function ResizeScreen(Width,Height)
{window.moveTo(0,0);
var PageWidth = Width;	
if (Height == null) 
	{PageHeight = screen.availHeight} 	
else 
	{PageHeight = Height} 	 	
if (screen.availHeight < Height) 
	{PageHeight = screen.availHeight};
if (screen.availWidth < Width) 
	{PageWidth = screen.availWidth};
window.resizeTo(PageWidth,PageHeight);
}

// End -->

<!-- Begin function for getting correct object prefix, according to how browser treats document elements

function getObj(name)
{
  if (document.getElementById)
  {
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
	this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
   	this.obj = document.layers[name];
   	this.style = document.layers[name];
  }
}

// End -->

<!-- Begin function for showing a help box (div) on screen

function show_help_box(divname,boxheight)
{
var divtoshow = new getObj(divname);
divtoshow.style.display = "block";
}

// End -->

<!-- Begin function for showing a menu help box (div) on screen

function show_menu_help_box(divname,toppos,boxheight)
{
var divtoshow = new getObj(divname);
if (divtoshow.obj.innerHTML != '') 
	{divtoshow.style.display = "block";}
divtoshow.style.top = toppos + 'px';
}

// End -->
<!-- Begin function for hiding a help box (div) on screen

function hide_help_box(divname)
{
var divtohide = new getObj(divname);
divtohide.style.display = "none";  
}

<!-- Begin function for generating text email link 

// **************************************************************
// AUTHOR: Andrew Green (copyright 2004)
// URL: http://www.andrewgreen.biz
// Feel free to use this script - just leave this message intact.
// **************************************************************

function GenerateEmailLink(domain,emailrecipient,linktype,linktext,styleclass,atagtitle,emailsubject,emailbody,atagid)
{
var atsign = '@';
if (domain.substr(0,4) == 'www.')
	{domain = domain.substring(4,(domain.length+1));}
if (domain.substr(0,11) == 'http://www.')
	{domain = domain.substring(11,(domain.length+1));}
if (emailrecipient.indexOf('@') > -1)
	{emailaddress = emailrecipient} 
else
	{emailaddress = emailrecipient + atsign + domain} 
if (emailaddress.search(/[ \/;:,]/) > -1)
	{alert ('email addresses can\'t have a space or , or ; or : or / in them.\nYou used \'' + emailrecipient + '\', which is invalid'); return} 
if ((linktype != 'text') && (linktype != 'address')) 
	{alert ('the linktype argument must be \'text\' or \'address\'.\nYou used \'' + linktype + '\''); return;}
if ((atagid == '') || (atagid == undefined)) 
	{idattribute=''} 
else 
	{idattribute = 'id="' + atagid + '" '}
if ((emailsubject == '') || (emailsubject == undefined))  
	{emailsubjectsubattribute=''} 
else
	{emailsubjectsubattribute = '?subject=' + emailsubject};
if ((emailbody == '') || (emailbody == undefined))  
	{emailbodysubattribute=''} 
else
	{emailbodysubattribute = '&body=' + emailbody};
atagcode = '<a class="' 
	+ styleclass + '" ' 
	+ idattribute
	+ 'href="mailto:'
	+ emailaddress
	+ emailsubjectsubattribute 
	+ emailbodysubattribute
	+ '" title="'
	+ atagtitle
	+ '">';
(linktype == 'text')? 
	linkcode = linktext + '</a>' : 
	linkcode = emailrecipient + atsign + domain + '</a>';
document.write (atagcode);
document.write (linkcode);
}

// End -->

<!-- Begin function for generating email anchor tag for an image 

// **************************************************************
// AUTHOR: Andrew Green (copyright 2004)
// URL: http://www.andrewgreen.biz
// Feel free to use this script - just leave this message intact.
// **************************************************************

function GenerateEmailAnchor(domain,emailrecipient,atagtitle,emailsubject,emailbody)
{
var atsign = '@';
if (domain.substr(0,4) == 'www.')
	{domain = domain.substring(4,(domain.length+1));}
if (domain.substr(0,11) == 'http://www.')
	{domain = domain.substring(11,(domain.length+1));}
if (emailrecipient.indexOf('@') > -1)
	{emailaddress = emailrecipient} 
else
	{emailaddress = emailrecipient + atsign + domain} 
if (emailaddress.search(/[ \/;:,]/) > -1)
	{alert ('email addresses can\'t have a space or , or ; or : or / in them.\nYou used \'' + emailrecipient + '\', which is invalid'); return} 
if ((emailsubject == '') || (emailsubject == undefined))  
	{emailsubjectsubattribute=''} 
else
	{emailsubjectsubattribute = '?subject=' + emailsubject};
if ((emailbody == '') || (emailbody == undefined))   
	{emailbodysubattribute=''} 
else 
	{emailbodysubattribute = '&body=' + emailbody};
atagcode = '<a class="' 
	+ '" href="mailto:'
	+ emailaddress
	+ emailsubjectsubattribute 
	+ emailbodysubattribute
	+ '" title="'
	+ atagtitle
	+ '">';
document.write (atagcode);
}

// End -->

<!-- Begin function for generating email anchor tag (for buttons) 

// **************************************************************
// AUTHOR: Andrew Green (copyright 2004)
// URL: http://www.andrewgreen.biz
// Feel free to use this script - just leave this message intact.
// **************************************************************

function GenerateEmailButtonAnchor(domain,emailrecipient,atagtitle,imgtagname,emailsubject,emailbody)
{
var atsign = '@';
if ((emailbody == '') || (emailbody == undefined))   
	{emailbodysubattribute=''} 
else 
	{emailbodysubattribute = '&body=' + emailbody};
atagcode = '<a class="' 
	+ '" href="mailto:'
	+ emailrecipient
	+ atsign
	+ domain
	+ '?subject='
	+ emailsubject 
	+ emailbodysubattribute
	+ '" title="'
	+ atagtitle
	+ '" '
	+ 'onmouseover="'
	+ imgtagname
	+ '.src=commover.src" onmouseout="'
	+ imgtagname
	+ '.src=commbutt.src">';
document.write (atagcode);
}

// End -->

<!-- Begin function for getting correct document body, to be used with checking the scroll position

function truebody()
{return (document.compatMode!="BackCompat")? document.documentElement : document.body}

// End -->

<!-- Begin function for setting up the reveal transition (ImageId is the 'id' of the image, TransNo is the transition number) to be shown with a transition -->

function SetupRevealtrans(ImageId,TransNo)
{
var StyleFilter ="revealTrans(Duration=2.0, Transition=";
if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4))    
	{ 
	ImageId.style.filter = StyleFilter += TransNo += ")";	
	ImageId.style.visibility = "hidden";
   	}
else
    	{ 
	ImageId.style.visibility = "hidden";
    	}
}
<!-- End -->

<!-- Begin function for setting up the hide transition (ImageId is the 'id' of the image, TransNo is the transition number) to be shown with a transition -->

function SetupHidetrans(ImageId,TransNo)
{
var StyleFilter ="revealTrans(Duration=2.0, Transition=";
if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4))    
	{ 
	ImageId.style.filter = StyleFilter += TransNo += ")";	
	ImageId.style.visibility = "visible";
   	}
else
    	{ 
	ImageId.style.visibility = "visible";
    	}
}
<!-- End -->

<!-- Begin function for applying a reveal transition to a particular image id (oImg) -->

function RevealTransition (oImg)
{
if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4))    
    {	oImg.filters[0].Apply();
    	oImg.style.visibility = "visible";
    	oImg.filters[0].Play();
    }
else
    { 
	oImg.style.visibility = "visible";
    }
}

<!-- End -->

<!-- Begin function for applying a hide transition to a particular image id (oImg)

function HideTransition (oImg)
{
if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4))    
    {	oImg.filters[0].Apply();
    	oImg.style.visibility = "hidden";
    	oImg.filters[0].Play();
    }
else
    { 
	oImg.style.visibility = "hidden";
    }
}

// End -->

<!-- Begin function for setting up the reveal transition (ImageId is the 'id' of the image, TransNo is the transition number) to be shown with a transition -->

function SetupFadeintrans(ImageId,Duration)
{
var StyleFilter ='progid:DXImageTransform.Microsoft.Fade(duration=';
if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4))    
	{ 
	ImageId.style.filter = StyleFilter + Duration + ')';	
	ImageId.style.visibility = "hidden";
   	}
else
    	{ 
	ImageId.style.visibility = "hidden";
    	}
}
<!-- End -->

<!-- Begin function for setting up the hide transition (ImageId is the 'id' of the image, TransNo is the transition number) to be shown with a transition -->

function SetupFadeouttrans(ImageId,Duration)
{
var StyleFilter ='progid:DXImageTransform.Microsoft.Fade(duration=';
if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4))    
	{ 
	ImageId.style.filter = StyleFilter + Duration + ')';	
	ImageId.style.visibility = "visible";
   	}
else
    	{ 
	ImageId.style.visibility = "visible";
    	}
}
<!-- End -->

<!-- Begin function for applying a reveal transition to a particular image id (oImg) -->

function FadeinTransition (oImg)
{
if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4))    
    {	oImg.filters[0].apply();
    	oImg.style.visibility = "visible";
    	oImg.filters[0].play();
    }
else
    { 
	oImg.style.visibility = "visible";
    }
}

<!-- End -->

<!-- Begin function for applying a hide transition to a particular image id (oImg) -->

function FadeoutTransition (oImg)
{
if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4))    
    {	oImg.filters[0].apply();
    	oImg.style.visibility = "hidden";
    	oImg.filters[0].play();
    }
else
    { 
	oImg.style.visibility = "hidden";
    }
}

<!-- End -->

<!-- Begin function for add favorites/bookmark reminder link

function FavPrompt (PageUrl,PageTitle)
{

if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) 
	{
	var msg = '<a class="limebluebold12" href="javascript:window.external.AddFavorite(';
	msg += "'";
  	msg += PageUrl;
	msg += "'";
	msg += ',';
	msg += "'";
	msg += PageTitle;
	msg += "'";
	msg += ')">';
	document.write(msg);
  	document.write('Click here</a>');
  	document.write(' to add this page to your Favorites!');
	}

else 
	{
  	var msg = "Don't forget to bookmark this page!";
  	if(navigator.appName == "Netscape") 
  		{  
    		msg += "  (CTRL+SHIFT+D)";
    		document.write(msg);
  		}
  	else
  		{
    		var msg = "Don't forget to add this page to your favorites!";
    		document.write(msg);
		}
	}
}
// End -->

<!-- Begin function for image favorites reminder link, with alert if Netscape

function ImageFavPrompt (PageUrl,PageTitle)

{
if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) 
	{
	window.external.AddFavorite(PageUrl,PageTitle);
  	}
else 
	{
  	var msg = "On Netscape, you should press CTRL+SHIFT+D to bookmark this page";
  	if(navigator.appName == "Netscape") 
  		{  
    		alert(msg);
    		}
  	else
  		{
		alert("Unfortunately, your browser can't do this automatically ... but don't forget to add this page to your favorites now");   		
		}
	}
}
// End -->

<!-- begin function for displaying "Good ... and welcome to LovefromMe" message -->
function displaywelcomemessage()
{
var summertimeoffset = 1;
var gmt = new Date;
var clocksgoforward = new Date;
var clocksgoback = new Date;
clocksgoforward.setMonth(2); // March
clocksgoforward.setDate(31);
var day = clocksgoforward.getDay();// day of week of 31st
clocksgoforward.setDate(31-day); // last Sunday
clocksgoback.setMonth(9); // October
clocksgoback.setDate(31);
day = clocksgoback.getDay();
clocksgoback.setDate(31-day);
if (gmt < clocksgoforward || gmt >= clocksgoback) 
	summertimeoffset = 0;

var todaysdate = new Date(); 
var timeis = todaysdate.getTime();
todaysdate.setTime(timeis);
var houris = todaysdate.getHours() + summertimeoffset;
if (houris > 17) 
	display = "evening"; 
else if (houris >=12) 
	display = "afternoon"; 
else 
	display = "morning"; 
var welcome = ('Good ' + display + ' &amp; welcome to ');
document.write(welcome);
}
<!-- end function -->

<!-- begin function for displaying the current month -->
function displaymonth()
{
var monthsarray = ['January','February','March','April','May','June','July','August','September','October','November','December'];
var summertimeoffset = 1;
var gmt = new Date;
var clocksgoforward = new Date;
var clocksgoback = new Date;
clocksgoforward.setMonth(2); // March
clocksgoforward.setDate(31);
var day = clocksgoforward.getDay();// day of week of 31st
clocksgoforward.setDate(31-day); // last Sunday
clocksgoback.setMonth(9); // October
clocksgoback.setDate(31);
day = clocksgoback.getDay();
clocksgoback.setDate(31-day);

if (gmt < clocksgoforward || gmt >= clocksgoback) 
	summertimeoffset = 0;

var todaysdate = new Date(); 
var monthis = todaysdate.getMonth();
var displaymonth = (monthsarray[monthis]);
document.write(displaymonth);
}
<!-- end function -->

<!-- begin function for putting the top navi link for the current page in bold -->
function make_current_page_link_bold ()
{
var should_make_page_bold = false
if ((location.href.indexOf('index') > -1) || (location.href.indexOf('html') == -1))  
	{var link_to_make_bold = new getObj('homelink');should_make_page_bold = true;}
if (location.href.indexOf('about') > -1) 
	{var link_to_make_bold = new getObj('aboutlink');should_make_page_bold = true;}
if (location.href.indexOf('help') > -1) 
	{var link_to_make_bold = new getObj('helplink');should_make_page_bold = true;}
if (location.href.indexOf('clubwear-clubbing-cyber-gear') > -1) 
	{var link_to_make_bold = new getObj('clubwearlink');should_make_page_bold = true;}
if (location.href.indexOf('adjamiba') > -1) 
	{var link_to_make_bold = new getObj('adjlink');should_make_page_bold = true;}
if (location.href.indexOf('contact') > -1) 
	{var link_to_make_bold = new getObj('contactlink');should_make_page_bold = true;}
if (should_make_page_bold)
	{link_to_make_bold.style.fontWeight = 'bold';
	link_to_make_bold.obj.title = 'this page';}
}

/* function to change title attributes and set target="_blank" for the eBay listing links */
function ebay_link_changes ()
{
for (var i=0; i<document.links.length; i++)
	{
	if (document.links[i].href.indexOf('ebay')>-1)
		{
		document.links[i].title='click here to look at this item on eBay';
		document.links[i].target='_blank';
		}
	}
	
for (var i=0; i<document.images.length; i++)
	{
	if (document.images[i].src.indexOf('ebay')>-1) 		
		{
		document.images[i].alt='click here to look at this item on eBay';
		document.images[i].title='click here to look at this item on eBay';
		}
	}
}
