<!-- Begin function for resizing screens - arg 1 is required width, arg 2 is required height

// **************************************************************
// AUTHOR: Andrew Green (copyright 2004)
// URL: http://www.andrewgreen.biz
// Feel free to use this script - just leave this message intact.
// **************************************************************

function ResizeScreen(ReqdWidth,Height)
{
if (navigator.appName != "Microsoft Internet Explorer") {return} 
window.moveTo(0,0);
var PageWidth = ReqdWidth;	
if (Height == null) 
	{PageHeight = screen.availHeight}
else
	{PageHeight = Height} 	
if (screen.availHeight < Height) 
		{PageHeight = screen.availHeight}
if (screen.availWidth > 1024)
	{PageWidth = 1024}
else
	{if (screen.availWidth < ReqdWidth) 
		{PageWidth = screen.availWidth}};
window.resizeTo(PageWidth,PageHeight);
}

// End -->

<!-- Begin function for displaying sttaus message

function StatusMsg(statusmsg)
{
window.status = statusmsg;
}

// End -->

<!-- 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 (arguments.length < 6)
	{alert ('you must pass at least 6 arguments to the function.\nYou passed only ' + arguments.length); return;}	
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 == '') || (arguments.length < 9)) 
	{idattribute=''} 
else 
	{idattribute = 'id="' + atagid + '" '}
if ((emailsubject == '') || (arguments.length < 7))  
	{emailsubjectsubattribute='';} 
else
	{emailsubjectsubattribute = '?subject=' + emailsubject};
if ((emailbody == '') || (arguments.length < 8))  
	{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 (arguments.length < 3)
	{alert ('you must pass at least 3 arguments to the function.\nYou passed only ' + arguments.length); return;}	
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 == '') || (arguments.length < 4))  
	{emailsubjectsubattribute=''} 
else
	{emailsubjectsubattribute = '?subject=' + emailsubject};
if ((emailbody == '') || (arguments.length < 5))   
	{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 == '') || (arguments.length < 6))   
	{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 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 resizing enlargement screens - arg 1 is required width, arg 2 is required height

function OldResizeScreen(Width,Height)
{window.moveTo(0,0);
var PageWidth = Width;	
if (Height == null) 
	{PageHeight = screen.availHeight} 	
else 
	{PageHeight = Height} 	 	
if (screen.availWidth < Width) 
	{PageWidth = screen.availWidth};
window.resizeTo(PageWidth,PageHeight);
}

// End -->


<!-- Begin function for setting the style for an image (ImageId is the 'id' of the image, TransNo is the transition number) to be shown with a transition

function SetImageStyle(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 = "visible";
    	}
}
// End -->

<!-- Begin function for applying a transition to a particular image id (oImg)

function applyTransition (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 generating links 

// **************************************************************
// AUTHOR: Andrew Green (copyright 2004)
// URL: http://www.andrewgreen.biz
// Feel free to use this script - just leave this message intact.
// **************************************************************

function GenerateLink(linktype,linkurl,linktext,atagtitle,htmlimgtag)
{
var displayedlinkurl = linkurl;
if (linkurl.indexOf('www') == -1) {displayedlinkurl = 'http://' + linkurl};
var htmlatag = '<a href="http://' + linkurl + '" target="_blank" title="' + atagtitle + ' (opens in a new window)">';
document.write('<tr align="left"><td class="linksdesc">');
document.write(htmlatag); 
if (linktype == 'image')
	{
	document.write(htmlimgtag + ' ');
	}
document.write(linktext + '</a>');
document.write('<br><td align="left" class="linkslink" >');
document.write(htmlatag);
document.write(displayedlinkurl + '</a><br></tr>');
}

// End -->

<!-- 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 -->

<!-- function for displaying buy button and adding to shopping basket -->
function origbuy (img_tag_name,picture_name,basket_code,extra_flag)
{
var code_end = 'O'
var framed_unframed_orig_qualifier ='';
if (extra_flag == 'U')
	{framed_unframed_orig_qualifier = ' unframed';
	code_end = 'UO'
	}
if (extra_flag == 'F')
	{framed_unframed_orig_qualifier = ' framed'
	code_end = 'FO'
	}
document.write ('<a class="ilinks" href="http://www.romancart.com/cart.asp?itemcode=ART-MCB-' +
	basket_code +
	'-' +
	code_end +
	'&storeid=16119" target="_blank" onmouseover="' +
	img_tag_name + 
	'origbuy.src=buyover.src" onmouseout="' +
	img_tag_name + 
	'origbuy.src=buybutt.src" ' +
	'title="click here to add the' +
	framed_unframed_orig_qualifier +
	' original of \'' +
	picture_name +
	'\' to your Shopping Basket - you can remove it later if you change your mind">') 
document.write ('<img name="' +
	img_tag_name + 
	'origbuy" src="images/buybutt.gif" border="0" ' +
	'alt="click here to add the' +
	framed_unframed_orig_qualifier +
	' original of \'' +
	picture_name +
	'\' to your Shopping Basket - you can remove it later if you change your mind"></a>') 
}

<!-- function for displaying buy button and adding an unframed print to the shopping basket -->
function ufprintbuy (picture_name,basket_code,extra_flag)
{
document.write ('<b>&pound;40</b>&nbsp;&nbsp;<a class="ilinks" href="http://www.romancart.com/cart.asp?itemcode=ART-MCB-' +
	basket_code +
	'-U&storeid=16119" target="_blank" onmouseover="' +
	'unframedbuy.src=buyover.src" onmouseout="' +
	'unframedbuy.src=buybutt.src" ' +
	'title="click here to add an unframed print of \'' +
	picture_name +
	'\' to your Shopping Basket - you can remove it later if you change your mind">') 
document.write ('<img name="' +
	'unframedbuy" src="images/buybutt.gif" border="0" ' +
	'alt="click here to add an unframed print of \'' +
	picture_name +
	'\' to your Shopping Basket - you can remove it later if you change your mind"></a>') 
}

<!-- function for displaying buy button and adding a framed print to the shopping basket -->
function fprintbuy (picture_name,basket_code,extra_flag)
{
document.write ('<br><br><b>Framed print of&nbsp; \'' +
	picture_name +
	'\' - <span style="color: red">only </span>&pound;80</b>' +
	'&nbsp;&nbsp;<a class="ilinks" href="javascript:show_help_box(\'ukconfirm\');" ' +
	'onmouseover="framedbuy.src=buyover.src" onmouseout="framedbuy.src=buybutt.src" ' +
	'title="click here to add a framed print of \'' + 
	picture_name +
	'\' to your Shopping Basket - you can remove it later if you change your mind">' +
	'<img name="framedbuy" src="images/buybutt.gif" border="0" alt="click here to add a framed print of \'' +
	picture_name +
	'\' to your Shopping Basket - you can remove it later if you change your mind"></a>' +
	'<div id="ukconfirm" class="fprintbox">' +
	'We offer free delivery on all framed prints if you live in the UK, but we have to charge for delivery to anywhere else.' +
	'<br /><br />' +
	'If you live in the UK, ' +
	'<a href="http://www.romancart.com/cart.asp?itemcode=ART-MCB-' +
	basket_code +
	'-F&storeid=16119" target="_blank" onclick="hide_help_box(\'ukconfirm\')">' +
	'click here</a> ' +
	'to go ahead with adding a framed print of \'' +
	picture_name +
	'\' to your Shopping Basket (you can remove it later if you change your mind).' +
	'<br /><br />' +
	'If you live outside the UK, just ' +
	'<script type="text/javascript">' +
	'GenerateEmailLink(\'1-art-1.com\',\'sales.enquiries\',\'text\',\'click here\',\'\',\'click here to enquire about delivery/shipping charges outside the UK\',\'An enquiry about charges for delivering framed prints outside the UK\',\'\')' +
	'</script>' +
	' to email us and we will give you a quote for delivery' +
	'<br /><br />' +
	'<center>' +
	'&lt;&nbsp;<a href="javascript:hide_help_box(\'ukconfirm\');" ' +
	'title="click here to hide this box again">close this box</a>&nbsp;&gt;' +
	'</center>' +
	'</div>')
}

<!-- creat print buy buttons, names, etc -->
function printbuy (picture_name,basket_code,extra_flag)
{
document.write ('<b>&pound;40</b>&nbsp;&nbsp;<a class="ilinks" href="http://www.romancart.com/cart.asp?itemcode=ART-MCB-' +
	basket_code +
	'-U&storeid=16119" target="_blank" onmouseover="' +
	'unframedbuy.src=buyover.src" onmouseout="' +
	'unframedbuy.src=buybutt.src" ' +
	'title="click here to add an unframed print of \'' +
	picture_name +
	'\' to your Shopping Basket - you can remove it later if you change your mind">') 
document.write ('<img name="' +
	'unframedbuy" src="images/buybutt.gif" border="0" ' +
	'alt="click here to add an unframed print of \'' +
	picture_name +
	'\' to your Shopping Basket - you can remove it later if you change your mind"></a>') 

/*
document.write ('<br><br><b>Framed print of&nbsp; \'' +
	picture_name +
	'\' - <span style="color: red">only </span>&pound;80</b>' +
	'&nbsp;&nbsp;<a class="ilinks" href="javascript:show_help_box(\'ukconfirm\');" ' +
	'onmouseover="framedbuy.src=buyover.src" onmouseout="framedbuy.src=buybutt.src" ' +
	'title="click here to add a framed print of \'' + 
	picture_name +
	'\' to your Shopping Basket - you can remove it later if you change your mind">' +
	'<img name="framedbuy" src="images/buybutt.gif" border="0" alt="click here to add a framed print of \'' +
	picture_name +
	'\' to your Shopping Basket - you can remove it later if you change your mind"></a>' +
	'<div id="ukconfirm" class="fprintbox">' +
	'We offer free delivery on all framed prints if you live in the UK, but we have to charge for delivery to anywhere else.' +
	'<br /><br />' +
	'If you live in the UK, ' +
	'<a href="http://www.romancart.com/cart.asp?itemcode=ART-MCB-' +
	basket_code +
	'-F&storeid=16119" target="_blank" onclick="hide_help_box(\'ukconfirm\')">' +
	'click here</a> ' +
	'to go ahead with adding a framed print of &nbsp;<b>' +
	picture_name +
	'</b> to your Shopping Basket (you can remove it later if you change your mind).' +
	'<br /><br />' +
	'If you live outside the UK, just ' +
	'<script type="text/javascript">' +
	'GenerateEmailLink(\'1-art-1.com\',\'sales.enquiries\',\'text\',\'click here\',\'\',\'click here to enquire about delivery/shipping charges outside the UK\',\'An enquiry about charges for delivering framed prints outside the UK\',\'\')' +
	'</script>' +
	' to email us and we will give you a quote for delivery' +
	'<br /><br />' +
	'<center>' +
	'&lt;&nbsp;<a href="javascript:hide_help_box(\'ukconfirm\');" ' +
	'title="click here to hide this box again">close this box</a>&nbsp;&gt;' +
	'</center>' +
	'</div>')
*/
}

<!-- 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];
  }
}

<!-- 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";
}

<!-- Begin function for hiding a help box (div) on screen -->

function hide_help_box(divname)
{
var divtohide = new getObj(divname);
divtohide.style.display = "none";  
}


/*************************************************************************
  This code is from Dynamic Web Coding at dyn-web.com
  Copyright 2003-5 by Sharon Paine 
  See Terms of Use at http://www.dyn-web.com/bus/terms.html
  regarding conditions under which you may use this code.
  This notice must be retained in the code as is!
*************************************************************************/

function doTooltip(e, msg) {
  if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
  Tooltip.show(e, msg);
}

function hideTip() {
  if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
  Tooltip.hide();
}

