/*************************************************************************
This code is from Dynamic Web Coding at http://www.dyn-web.com/
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 getDocHeight(doc) {
var docHt = 0, sh, oh;
if (doc.height) docHt = doc.height;
else if (doc.body) {
if (doc.body.scrollHeight) docHt = sh = doc.body.scrollHeight;
if (doc.body.offsetHeight) docHt = oh = doc.body.offsetHeight;
if (sh && oh) docHt = Math.max(sh, oh);
}
return docHt;
}

function setIframeHeight(iframeName) {
var iframeWin = window.frames[iframeName];
var iframeEl = document.getElementById? document.getElementById(iframeName): document.all? document.all[iframeName]: null;
if ( iframeEl && iframeWin ) {
iframeEl.style.height = "auto"; // helps resize (for some) if new doc shorter than previous
var docHt = getDocHeight(iframeWin.document);
// need to add to height to be sure it will all show
if (docHt) iframeEl.style.height = docHt + 30 + "px";
}
}

function loadIframe(iframeName, url) {
if ( window.frames[iframeName] ) {
window.frames[iframeName].location = url;
return false;
}
else return true;
}


function checkEnter(e){ //e is event object passed from function invocation var characterCode literal character code will be stored in this variable

if(e && e.which){ //if which property of event object is supported (NN4)
e = e
characterCode = e.which //character code is contained in NN4's which property
}
else{
e = event
characterCode = e.keyCode //character code is contained in IE's keyCode property
}


if(characterCode == 13){ //if generated character code is equal to ascii 13 (if enter key)

document.forms[0].action = "";
document.forms[0].submit() //submit the form
return false
}
else{
return true
}

}

function sampleform() {

document.forms[0].action = '<%=application("url") %><%=Master.CartURL %>';
document.forms[0].submit() //submit the form

}

function selectCode(f){
document.forms[f].elements[0].focus();
document.forms[f].elements[0].select();
}
function changeScrollbarColor(C){
  if (document.all){
    document.body.style.scrollbarBaseColor = C
  }  
}

$(document).ready(function(){
			$("a[rel^='prettyPhoto']").prettyPhoto({
				animationSpeed: 'normal', /* fast/slow/normal */
				padding: 40, /* padding for each side of the picture */
				opacity: 0.7, /* Value betwee 0 and 1 */
				showTitle: true, /* true/false */
				allowresize: true, /* true/false */
				counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
				theme: 'dark_rounded', /* light_rounded / dark_rounded / light_square / dark_square */
				callback: function(){}
			});
		});
		
		
		
		
		// What is $(document).ready ? See: http://flowplayer.org/tools/using.html#document_ready
//$(document).ready(function() {

//var triggers = $("a.helplinks").overlay({

//	// some expose tweaks suitable for modal dialogs
//	expose: {
//		color: '#000',
//		loadSpeed: 200,
//		opacity: 0.7
//	},

//	closeOnClick: true
//});

//$("#prompt form").submit(function(e) {

	// close the overlay


	// get user input
//	var input = $("input", this).val();

	// do something with the answer
//	triggers.eq(1).html(input);

	// do not submit the form
	
//});

//});


