if(self.parent.frames.length!=1)window.location="../index.html"

function show_thumb(bool, tid, img_id)
{
	iel = tid.childNodes[0].childNodes[0].style;

	if(bool) {

		iel.filter = "alpha(opacity:100)";
		iel.MozOpacity = 1;
		if(!window.showHelp) iel.opacity = 1;
		if(!window.showHelp) iel.KhtmlOpacity = 1;

	} else {
		iel.filter = "alpha(opacity:40)";
		iel.MozOpacity = .4;
		if(!window.showHelp) iel.opacity = .4;
		if(!window.showHelp) iel.KhtmlOpacity = .4;
	}
}

var cur_img_buy;
var el2;
function show_large_wp(bool,el,el1){

	
	document.images[el].style.top=0;
	document.images[el].style.left=0;
	/* centers the image on the portfolio page */
	
	document.images[el].style.top=(300-(document.images[el].offsetHeight))/2+"px";
	document.images[el].style.left=(360-(document.images[el].offsetWidth))/2+"px";
	
	large_img_file = el1.src.substring(0,el1.src.lastIndexOf("_")+1);
	document.images[el].src = large_img_file + "lrg.jpg";
	
	cur_img_buy = large_img_file + "lrg.jpg";
	document.getElementById("buy_now").style.visibility="visible";
	el2=el;
	setTimeout('resizeIt(el2);',50);
	document.images[el].style.top=(300-(document.images[el].offsetHeight))/2+"px";
	document.images[el].style.left=(360-(document.images[el].offsetWidth))/2+"px";

	//alert(cur_img_buy);

}

function resizeIt(large) {
	
	document.images[large].style.top=(300-(document.images[large].offsetHeight))/2+"px";
	document.images[large].style.left=(360-(document.images[large].offsetWidth))/2+"px";
}


function check_out() {
	
	this.window.location = "checkout.html";
	alert(this.window.location.href);
}


var ii=1;

var wed_thumb_width=0;
var neo_thumbs_width=0;
var pan_thumbs_width=0;
var thumbs_width=62;
var thismany=0;
var thismanysteps=0;
var numsteps=0;

function move_thumbs(tid,forward) {
	
	(window.showHelp) ? thismany = (document.getElementById(tid).childNodes.length) : thismany = (document.getElementById(tid).childNodes.length /2);
	thismanysteps = thismany-8;
	
	window.status= thismanysteps + " - " + thismany;
	if(forward) {
		if((thismanysteps - numsteps)>=1) {

			//alert(thismanysteps - numsteps)
			document.getElementById("move_thumbs").style.left = document.getElementById("move_thumbs").offsetLeft -64+"px"; //64 = width of thumb plus offset
			document.getElementById("thumbs_back").style.visibility="visible"
			iel = document.getElementById("thumbs_back").style;
			iel.filter = "alpha(opacity:100)";
			iel.MozOpacity = 1;
			if(!window.showHelp) iel.opacity = 1;
			if(!window.showHelp) iel.KhtmlOpacity = 1;
			iel.cursor="hand";
			numsteps++;

		}

		if(thismanysteps - numsteps < 1) {

			iel = document.getElementById("thumbs_forward").style;
			iel.filter = "alpha(opacity:30)";
			iel.MozOpacity = .3;
			if(!window.showHelp) iel.opacity = .3;
			if(!window.showHelp) iel.KhtmlOpacity = .3;
			iel.cursor="default";
			

		}

	} else if((thismanysteps - numsteps)<=(thismanysteps-1)) {
		if(wed_thumb_width+document.getElementById("move_thumbs").offsetLeft<(wed_thumb_width)) {

			document.getElementById("move_thumbs").style.left = document.getElementById("move_thumbs").offsetLeft+64+"px"; //64 = width of thumb plus offset
			document.getElementById("thumbs_back").style.visibility="visible"
			iel = document.getElementById("thumbs_forward").style;
			iel.filter = "alpha(opacity:100)";
			iel.MozOpacity = 1;
			if(!window.showHelp) iel.opacity = 1;
			if(!window.showHelp) iel.KhtmlOpacity = 1;
			iel.cursor="hand";

		}
		if(wed_thumb_width+document.getElementById("move_thumbs").offsetLeft==(wed_thumb_width)) {

			iel = document.getElementById("thumbs_back").style;
			iel.filter = "alpha(opacity:30)";
			iel.MozOpacity = .3;
			if(!window.showHelp) iel.opacity = .3;
			if(!window.showHelp) iel.KhtmlOpacity = .3;
			iel.cursor="default";



		}
		numsteps--;

	}
	window.status=thismanysteps - numsteps;
}
	
function buyme(me) {
	window.location='order.asp?' + cur_img_buy;	
	window.status= "order"		
}

var size;

function update_total(value)	{
		
	cur_img_buy = buy_imgs;
	size = valuel;
		
}

