/* easy peasy Template naming pragma:
 * 
 * function_name__template_name
 * 
 */

function WindowRR(){
	var h = screen.height - 100
	self.location='/helpproductinfo.shtml';
	//window.open("/helpproductinfo.shtml","popWin","scrollbars=yes,resizable=yes,toolbar=no,menubar=no,directories=no,height="+h+",width=600,top=20,left=20")
}
function ShowOrHideComboText(divid, display,extended){
	document.getElementById(divid).style.display = display
	if(extended){
		if(document.getElementById(extended).innerHTML.length > 10){
			document.getElementById(divid + 'e').style.display = 'block';
		}
	}
}

var Templates = $H({});		


Templates.lightbox_new__body = new Template(
	'<div id="lightboxPopUp">'
	+'<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1" ALIGN="left" width="290" height="200"><TR>'
	+'<td class="dark1" valign=bottom width="100%"><DIV class="barheader">&nbsp;<FONT class="bartitle">Make a new lightbox</font></DIV></td></tr>'
	+'<tr><TD ALIGN="left" VALIGN="top" width="290" class="dark1"><DIV class="light1" style="padding: 15px;"><form action="javascript:nada();" method="get" name="send"><p>Enter a name for your new lightbox in the box below '
	+'</p><p><INPUT type="text" name="lightbox_new_name" id="lightbox_new_name" size="15" class="emailbox" value="My new LB name" onfocus="if (this.value == \'My new LB name\'){ this.value=\'\';}">'
	+'<A href="" onclick="lightbox_new_send(); return false;" class=lblink style="font-size: 10pt; font-weight:bold;">Create the Lightbox</A><BR><BR>'
	+'Note:  You must enter a unique name for your new lighbox.  It will only be viewable by you unless you use the "E-mail this lightbox" function to share it with someone.<BR><BR>'
	+'If you do not need a lightbox anymore click the link below.<br><br><A HREF="" onclick="lightbox_email(\'close\'); return false;">[X] close window</A>'
	+'</div>' 
);
		
Templates.lightbox_email__body = new Template(
	'<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1" ALIGN="left" width="390" height="280"><TR>'
	+'<td class="dark1" valign=bottom width="100%"><DIV class="barheader"><FONT class="bartitle">Email your lightbox to a friend</font></DIV></td></tr>'
	+'<tr><TD ALIGN="left" VALIGN="top" width="390" class="dark1"><DIV class="light1" style="padding: 15px;"><form action="javascript:nada();" method="get" name="send"><p><B>E-mail your lightbox '
	+'"#{currentlbname}"</B> to a friend or colleague.</p><p><B>1.</B> Send To:<CODE>*</CODE></b></font><br><input type="text" name="to_email" id="to_email" size="35" class="emailbox" value="friend@domain.com" onfocus="if (this.value == \'friend@domain.com\') {this.value=\'\';}"><BR>'
	+'<BR><B>2.</B> Message:<BR><TEXTAREA NAME="mail_text" ID="mail_text" ROWS="7" COLS="45"></TEXTAREA><BR><BR><B>3.</B> <input type="checkbox" id="readonly" name="readonly" value=1> Read only<BR><FONT CLASS="xsmall">check this box to prevent recipient from changing your lightbox.</FONT></p>'
	+'<B>4.</B> <input type="checkbox" name="notify" id="notify" value="1"><font class="small">Notify me when this lightbox is viewed</font><br>'
	+'#{emaillbaddhtml}<br><p><A href="" onclick="lightbox_email_send(); return false;" class=lblink style="font-size: 10pt;font-weight:bold;">Send the Lightbox</A>'
	+'<input type="hidden" name="ot" value="2"><input type="hidden" name="dsm" value="1"></center></form><br><br><p>If you have changed your mind, click the link below.<BR><BR> <A HREF="" onclick="lightbox_email(\'close\'); return false;">[X] close window</A>.<BR>'
	+'</DIV></TD></TR></TABLE>'
);
		
Templates.lightbox_rename__body = new Template(
	'<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1" ALIGN="left" width="290"><TR>'
	+'<td class="dark1" valign=bottom width="100%"><DIV class="barheader">&nbsp;<FONT class="bartitle">Rename  lightbox</font></DIV></td></tr>'
	+'<tr><TD ALIGN="left" VALIGN="top" width="290" class="dark1"><DIV class="light1" style="padding: 15px;"><form action="javascript:nada();" method="get" name="send"><p>'
	+'</p><p><INPUT type="text" name="lightbox_new_name" id="lightbox_new_name" size="15" class="lightbox_new_name" value="#{currentlbname}" onfocus=" if (this.value == \'#{currentlbname}\'){ this.value=\'\';}">'
	+'<A href="" onclick="lightbox_rename_send(); return false;" class=lblink style="font-size: 10pt; font-weight:bold;">Rename</A><br/>'
	+'<A HREF="" onclick="lightbox_email(\'close\'); return false;">[X] close window</A>'
	+'</form></DIV></TD></TR></TABLE>'
);

Templates.simplemessage__body = new Template(
	'<DIV class=light1 style="text-align:center; width:400px; height:100px; text-align:left; padding:10px; margin-top:200px"><FONT class="header">#{message}</DIV>'
);

Templates.simplemessage__body_lightbox = new Template(
	'<DIV class=light1 style="position:absolute; left:0px; bottom:0px; width:100%; height:30px; text-align:left; padding:10px 20px 10px 20px; margin-top:20px"><FONT class="header">#{message}</DIV>'
);

//this is the metadata layout for a popup
Templates.sp_act__metadata = new Template (
	'<span class="previewtext"># #{displayimageid} #{rmrftype} #{filesize} #{dimensions} :: #{shortcaption} #{photographer} #{imagerestrictions}'
	+'<br/>'
	+'<span class="warning"> To turn live previews off, use Previews menu at top of page </span>'
);

Templates.enlarge2_act__similars = new Template (
	'<TD valign="top" align="left" width="120" height="440">'
	+'<div style="position:relative; overflow: auto; overflow-y: auto; overflow-x: hidden; height:75%">'
	+"<B>Similar Images:</B><BR>"
	+'#{simcolinfo}'
	+'</div></TD>'
);
		
Templates.enlarge2_act__body = new Template (
	'<table cellspacing="0" cellpadding="0" border="0" width="99%" style="height:99%;overflow:auto">'
		+'<TR height="99%">'
			+'<TD align="left" valign="top" width="99%" height="99%" style="overflow:auto">'
				+'<table cellspacing="4" cellpadding="0" border="0" width="99%" height="99%">'
				+'<TR><TD valign="top" align="left" width="430" height="420" style="min-width: 440px">'
					+'<div style="position:relative">#{themediainsert}</div>'
				+'<br/></td>'


				+'#{similarscolumn}'
					+'<nobr>#{navenlargedlinksprev}'
				+'<TD align="left" rowspan=2 width="325" valign="top" style="border-left: 1px solid #bbbbbb;padding-left: 13px;">'
					+'<nobr>#{navbacklinks}'
					+'#{navenlargedlinks}</nobr>'
					+'<br/><a href="" onclick="lightbox_addto(\'#{enlargetid}\'); return false;"><img src="/graphics/icon_lightbox.gif" width=21 height=15 border=0 alt=""> ADD TO CURRENT LIGHTBOX </a>'
					+'<br/><a href="" onclick="cart_addto(\'#{enlargetid}\'); return false;"><img src="/graphics/icon_cart.gif" width=21 height=15 border=0 alt=""> ADD TO SHOPPING CART</a>'
					+'<br/>#{downloadcomplink}'
					+'<BR/><b>Image Number:</b> #{displayenlargetid}&nbsp;[#{rmrftype}]'
					+'#{dimensions}'
					+'<br/><b>Caption:</b> #{myshortcaption}<br/>'
					+'#{releaseinfo}'
					+'#{photographerinfo}'
					+'#{filesizeinfo}'
					+'#{restrictionsinfo}'
					+'<BR/><A class="olink" id="enalarge_keywords_text" onclick="popkeys2(\'enlarge_keywords\', this); return false;">Show keywords</A><BR>'
					+'<div id="enlarge_keywords" style="display:none; overflow-y:auto;">'
					+'#{keywordinfo}'
					+'</div>'
                                +'</td><TD rowspan=2 align="left" valign="top" style="border-left: 1px solid #bbbbbb; padding-left:13px;">'
                                        +'#{ratetierinfo}'
                                +'</TD></TR>'
                                +'<tr><td>#{rfcdlinkslug}</td></tr>'
				+'</table>'
	+'<BR></td></TR></table>'
);





Templates.hovercopyright__text = new Template (
	'&copy;#{currentyear} #{baseurl}  All rights reserved <a href=/help_login.shtml#Terms_and_Conditions class=disclaimer>Terms</a> <a href=/help_faq.shtml#Privacy_Policy class=disclaimer>Privacy policy</A> &nbsp;<A HREF=/contact.shtml class=disclaimer>contact</a></FONT></nobr>'
);

Templates.footer__body = new Template (
	'<DIV id="copyright"><span class="disclaimer"><A href="/aboutus_mission.shtml" onmouseover="hovercopyright();" class="disclaimer">&copy; #{currentyear} </A></span></DIV>'
);

Templates.tieredimgpricing__rfslug = new Template (
	'<div align="left"><IMG src=/graphics/h_RoyaltyFree.gif border=0 alt="Royalty Free Licensing"></div>'+
	'<h4 style="text-align: left;">Select a File Size</h4>'+
	'<table style="text-align: left;width: 95%;" cellpadding=0 cellspacing=0>#{rows}</table>'
);

Templates.tieredimgpricing__rfslug_row = new Template (
	'<tr><td align="left" nowrap="nowrap" valign="top" style="padding-bottom: 4px; padding-top: 4px;border-bottom: solid #999 1px;">#{expr}</td><td align="right" valign=top style="border-bottom: solid #999 1px;padding-bottom: 4px; padding-top: 4px;">#{currency} #{price}<BR><nobr><A href="#" class=orangelink onclick="cart_addto(\'#{enlargetid}\', { ln:\'#{enlargetid}\', lictype:\'RF\', base:\'#{base}\', Size_opname:\'#{id}\', usage:\'#{usage}\'}); return false;">Add to Cart</a></nobr></td></tr>' );

Templates.tieredimgpricing__rrslug = new Template (
	'<div align="left"><font class="header">Rights Ready licensing</font><BR clear=all/></div>'+
	'<A href="/EULA_wininitiative_RR.pdf" TITLE="View License Agreement as a pdf" class="EULA" target="eula">View Rights Ready License Agreement (pdf file)</A><BR clear=all>'+
        '<table cellspacing=0 cellpadding=0 width="100%" >#{rows}</table>'
);
Templates.tieredimgpricing__rrslug_row = new Template (
	'<tr><td colspan=2><h2>#{name}<h2></td></tr>'+
	'<tr><td align=left style="border-bottom: 1px solid rgb(187, 187, 187);padding-bottom: 3px; padding-top: 4px;"><span><nobr><b>#{optname}</b></nobr></span><BR>'+
	'<div id="d#{id}"><a href="javascript:ShowOrHideComboText(\'d#{id}\', \'none\',\'e#{id}\'); ShowOrHideComboText(\'d#{id}2\', \'block\');" class="orangelink">Show Details</a></div>'+
	'  <div id="d#{id}2" style="display:none;"><a href="javascript:ShowOrHideComboText(\'d#{id}\', \'block\'); ShowOrHideComboText(\'d#{id}2\', \'none\');" class="orangelink">Hide Details</a>'+
	'<br />#{expr}<BR>'+	
	'<div id="d#{id}e" style="display:none;"><a href="javascript:ShowOrHideComboText(\'d#{id}e\', \'none\'); ShowOrHideComboText(\'d#{id}e2\', \'block\');" class="orangelink">Show Examples</a></div>'+
	'  <div id="d#{id}e2" style="display:none;"><a href="javascript:ShowOrHideComboText(\'d#{id}e\', \'block\'); ShowOrHideComboText(\'d#{id}e2\', \'none\');" class="orangelink">Hide Examples</a>'+
	'  <div id="e#{id}">#{expr_extended}</div></div>'+
	'</div></td><td align=right valign=top style="border-bottom: 1px solid rgb(187, 187, 187);padding-bottom: 4px; padding-top: 4px;">'+
	    '<div style="min-width: 50px; padding-right: 5px;">#{currency} #{price}</div> '+
	    '<div style="min-width: 50px;">'+
		'#{removebutton}'+
		'<nobr><A href="#" onclick="cart_addto(\'#{enlargetid}\',{ \'ln\':\'#{enlargetid}\', \'lictype\':\'RR\', \'base\':\'#{price}\', \'Size_opname\':\'#{id}\', \'usage\':\'#{usage}\', \'callback\':\'enlarge2(#{img_id},#{encount},null,1);\' }); return false;" class="orangelink">Add to Cart</a></nobr>'+
	    '</div>'+
	'</td></tr>' 
);

Templates.tieredimgpricing__rrslug_row_removebutton = new Template (
	'<nobr><a href="#" class="orangelink" onclick="cart_delete_license(#{img_id},{ \'lictype\':\'RR\', \'usage\':#{usage}, \'opts\':#{id}, \'callback\':\'enlarge2(#{img_id},#{encount},null,1);\' }); return false;">Remove Option</a><nobr> &nbsp;&nbsp;'
);

Templates.rfcd__cdimage_detail = new Template (
	'<table cellspacing=0 cellpadding=0 border=0>' +
	'<tr>' +
	    '<td style="padding-right:10px">' +
		'<img src="http://gdynx.ipnstock.com/blendimagesv2_images/135/50/#{prime_img}.JPG"/>' +
	    '</td>' +
	    '<td>' +
		'<span class="header">#{featureTitle}</span><br>' +
		'This image is part of the CD collection #{featureTitle}.<br/>' +
		'<i>#{featureText}</i><br/>' +
		'#{featureLine}<BR/>' +
		'<A HREF="javascript:cart_addto(\'#{prime_img}\');"><IMG BORDER=0 SRC="/graphics/cd.gif"> BUY THIS CD NOW</A><BR/><br/>' +
		'<A HREF="/SwishSearch?n=1&fn=#{featureNumber}&supst=cd">View all images on this CD</A><BR><A href=/cdstore.shtml>VIEW THE CD STORE</a>' +
	    '</td>' +
	'</tr>' +
	'</table>' 
);

