<!--
function FP_swapImg() {//v1.0
 var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array(); for(n=2; n<args.length;
 n+=2) { elm=FP_getObjectByID(args[n]); if(elm) { doc.$imgSwaps[doc.$imgSwaps.length]=elm;
 elm.$src=elm.src; elm.src=args[n+1]; } }
}

function FP_preloadImgs() {//v1.0
 var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array();
 for(var i=0; i<a.length; i++) { d.FP_imgs[i]=new Image; d.FP_imgs[i].src=a[i]; }
}

function FP_getObjectByID(id,o) {//v1.0
 var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id);
 else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;
 if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c)
 for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; }
 f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
 for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return el; } }
 return null;
}

function FP_swapImgRestore() {//v1.0
 var doc=document,i; if(doc.$imgSwaps) { for(i=0;i<doc.$imgSwaps.length;i++) {
  var elm=doc.$imgSwaps[i]; if(elm) { elm.src=elm.$src; elm.$src=null; } } 
  doc.$imgSwaps=null; }
}

var xmlHttp;

function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}

function charcount(val,obj,tot) {
	num=tot-(eval(val.length));
	if (val.length==0) {
		num=tot;
	}
	document.getElementById(obj).innerHTML=num;
}

function stateChanged() 
{
	if (xmlHttp.readyState==4) {
		str=xmlHttp.responseText;
		document.frmExpand.hidepricetot.value=document.frmExpand.hideprice.value;
		
			//document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)-eval
		pos=str.search(/<arttype>/);
		
		if (pos>-1) {(document.frmExpand.hidemediaval.value)-eval(document.frmExpand.framevalue.value)-eval(document.frmExpand.hidedigital.value);
			
			str=str.substring((pos+9));
			
			if (str.search(/none/)>-1) {
				row = document.getElementById("trformart1");
				row.className="gone";
				row = document.getElementById("trformart2");
				row.className="gone";
				row = document.getElementById("trformframe1");
				row.className="gone";
				row = document.getElementById("trformframe2");
				row.className="gone";
				row = document.getElementById("trformdigital1");
				row.className="gone";
				row = document.getElementById("trformdigital2");
				row.className="gone";
				row = document.getElementById("trframe");
				row.className="gone";
				row = document.getElementById("trDigital");
				row.className="gone";
				
				pos=str.search(/<mediadesc>/);
				if (pos>-1) {
					str=str.substring((pos+11));
					pos=str.search(/<mediaval>/);
					if (pos>-1) {
						mediadesc=str.substring(0,pos);
						mediaval=str.substring((pos+10));
						document.getElementById("tdmedia").innerHTML=mediadesc;
						if (eval(mediaval)==0) {
							document.getElementById("tdmediaval").innerHTML="incl";
						}
						else {
							document.getElementById("tdmediaval").innerHTML="$"+eval(mediaval).toFixed(0);
						}
						document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(mediaval);
						document.getElementById("spantot").innerHTML="$"+eval(document.frmExpand.hidepricetot.value).toFixed(0);
						document.frmExpand.hidemediaval.value=mediaval;
					}
				}
				
				if (document.frmExpand.hidesubjectval){
				val=document.frmExpand.hidesubjectval.value;
				if (val=="incl") {
					val=0;
				}
				document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(val);
				}
				
				if (document.frmExpand.hideproof) {
				val=document.frmExpand.hideproof.value;
				if (val=="incl") {
					val=0;
				}
				document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(val);
				}
				
				if (document.frmExpand.hidetiming) {
				val=document.frmExpand.hidetiming.value;
				if (val=="incl") {
					val=0;
				}
				document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(val);
				}
				
				if (document.frmExpand.hidephoto) {
				val=document.frmExpand.hidephoto.value;
				if (val=="incl") {
					val=0;
				}
				document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(val);
				}
				
				if (document.frmExpand.hidecrop) {
				val=document.frmExpand.hidecrop.value;
				if (val=="incl") {
					val=0;
				}
				document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(val);
				}
				
				if (document.frmExpand.backcost) {
					val=document.frmExpand.backcost.value;
					if (val=="incl") {
						val=0;
					}
					document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(val);
				}
			}
			else {
				row = document.getElementById("trformart1");
				row.className="show";
				row = document.getElementById("trformart2");
				row.className="show";
				row = document.getElementById("trformframe1");
				row.className="show";
				row = document.getElementById("trformframe2");
				row.className="show";
				row = document.getElementById("trformdigital1");
				row.className="show";
				row = document.getElementById("trformdigital2");
				row.className="show";
				row = document.getElementById("trframe");
				row.className="show";
				row = document.getElementById("trDigital");
				row.className="show";
				
				pos=str.search(/<frame>/);
				if (pos>-1) {
					document.getElementById("tdart").innerHTML=str.substring(0,pos);
					
					str=str.substring((pos+7));
					if (document.frmExpand.framevalue) {
						val=document.frmExpand.framevalue.value;
						if (val=="incl") {
							val=0;
						}
						//document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)-eval(val);
					}
					
					pos=str.search(/<mediadesc>/);
					if (pos>-1) {
						document.getElementById("tdformframe").innerHTML=str.substring(0,pos);
						val=document.frmExpand.framevalue.value;
						if (val=="incl") {
							val=0;
						}
						/*document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(val);
						document.getElementById("spantot").innerHTML="$"+eval(document.frmExpand.hidepricetot.value).toFixed(0);*/
						
						document.getElementById("tdframe").innerHTML=document.frmExpand.framesize.value;
						if (eval(val)>0) {
							document.getElementById("tdframeval").innerHTML="$"+eval(document.frmExpand.framevalue.value).toFixed(0);
						}
						else {
							document.getElementById("tdframeval").innerHTML="incl";
						}
						
						str=str.substring((pos+11));
						pos=str.search(/<mediaval>/);
						if (pos>-1) {
							mediadesc=str.substring(0,pos);
							mediaval=str.substring((pos+10));
							document.getElementById("tdmedia").innerHTML=mediadesc;
							if (eval(mediaval)==0) {
								document.getElementById("tdmediaval").innerHTML="incl";
							}
							else {
								document.getElementById("tdmediaval").innerHTML="$"+eval(mediaval).toFixed(0);
							}
							/*document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(mediaval);
							document.getElementById("spantot").innerHTML="$"+eval(document.frmExpand.hidepricetot.value).toFixed(0);*/
							document.frmExpand.hidemediaval.value=mediaval;
						}
					}
					else {
						document.getElementById("tdformframe").innerHTML=str;
						val=document.frmExpand.framevalue.value;
						if (val=="incl") {
							val=0;
						}
						/*document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(val);
						document.getElementById("spantot").innerHTML="$"+eval(document.frmExpand.hidepricetot.value).toFixed(0);*/
						
						document.getElementById("tdframe").innerHTML=document.frmExpand.framesize.value;
						if (eval(val)>0) {
							document.getElementById("tdframeval").innerHTML="$"+eval(document.frmExpand.framevalue.value).toFixed(0);
						}
						else {
							document.getElementById("tdframeval").innerHTML="incl";
						}
					}
				}
				if (document.frmExpand.hidedigital.value.length==0) {
					document.frmExpand.checkDigital[0].checked=true;
					document.frmExpand.hidedigital.value=0;
					document.getElementById("tddigital").innerHTML="No";
					document.getElementById("tddigitalval").innerHTML="incl";
				}
				
				if (document.frmExpand.hidesubjectval) {
				val=document.frmExpand.hidesubjectval.value;
				if (val=="incl") {
					val=0;
				}
				document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(val);
				}

				if (document.frmExpand.framevalue) {
				val=document.frmExpand.framevalue.value;
				if (val=="incl") {
					val=0;
				}
				document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(val);
				}
				
				if (document.frmExpand.hidemediaval) {
				val=document.frmExpand.hidemediaval.value;
				if (val=="incl") {
					val=0;
				}
				document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(val);
				}
				
				if (document.frmExpand.hideproof) {
				val=document.frmExpand.hideproof.value;
				if (val=="incl") {
					val=0;
				}
				document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(val);
				}
				
				if (document.frmExpand.hidetiming) {
				val=document.frmExpand.hidetiming.value;
				if (val=="incl") {
					val=0;
				}
				document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(val);
				}
				
				if (document.frmExpand.hidephoto) {
				val=document.frmExpand.hidephoto.value;
				
				if (val=="incl") {
					val=0;
				}
				document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(val);
				}
				
				if (document.frmExpand.hidecrop) {
				val=document.frmExpand.hidecrop.value;
				
				if (val=="incl") {
					val=0;
				}
				document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(val);
				}
				
				if (document.frmExpand.hidedigital) {
				val=document.frmExpand.hidedigital.value;
				if (val=="incl") {
					val=0;
				}
				document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(val);
				}
				
				if (document.frmExpand.backcost) {
					val=document.frmExpand.backcost.value;
					if (val=="incl") {
						val=0;
					}
					document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(val);
				}

			}
		}
		else {
			pos=str.search(/<frame>/);
			if (pos>-1) {
				str=str.substring((pos+7));
				val=document.frmExpand.framevalue.value;
				if (val=="incl") {
					val=0;
				}
				//document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)-eval(val);
				document.getElementById("tdformframe").innerHTML=str;
				val=document.frmExpand.framevalue.value;
				if (val=="incl") {
					val=0;
				}
				/*document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(val);
				document.getElementById("spantot").innerHTML="$"+eval(document.frmExpand.hidepricetot.value).toFixed(0);*/
				
				document.getElementById("tdframe").innerHTML=document.frmExpand.framesize.value;
				if (eval(val)>0) {
					document.getElementById("tdframeval").innerHTML="$"+eval(document.frmExpand.framevalue.value).toFixed(0);
				}
				else {
					document.getElementById("tdframeval").innerHTML="incl";
				}
				
				if (document.frmExpand.hidesubjectval) {
				val=document.frmExpand.hidesubjectval.value;
				if (val=="incl") {
					val=0;
				}
				document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(val);
				}
				
				if (document.frmExpand.framevalue) {
				val=document.frmExpand.framevalue.value;
				if (val=="incl") {
					val=0;
				}
				document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(val);
				}
				
				if (document.frmExpand.hidemediaval) {
				val=document.frmExpand.hidemediaval.value;
				if (val=="incl") {
					val=0;
				}
				document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(val);
				}
				
				if (document.frmExpand.hideproof) {
				val=document.frmExpand.hideproof.value;
				if (val=="incl") {
					val=0;
				}
				document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(val);
				}
				
				if (document.frmExpand.hidetiming) {
				val=document.frmExpand.hidetiming.value;
				if (val=="incl") {
					val=0;
				}
				document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(val);
				}
				
				if (document.frmExpand.hidephoto) {
				val=document.frmExpand.hidephoto.value;
				if (val=="incl") {
					val=0;
				}
				document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(val);
				}
				
				if (document.frmExpand.hidecrop) {
				val=document.frmExpand.hidecrop.value;
				if (val=="incl") {
					val=0;
				}
				document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(val);
				}
				
				if (document.frmExpand.hidedigital) {
				val=document.frmExpand.hidedigital.value;
				if (val=="incl") {
					val=0;
				}
				document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(val);
				}
				
				if (document.frmExpand.backcost) {
					val=document.frmExpand.backcost.value;
					if (val=="incl") {
						val=0;
					}
					document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(val);
				}
			}
		}
		setlargeimage();
		document.getElementById("spantot").innerHTML="$"+eval(document.frmExpand.hidepricetot.value).toFixed(0);
	}
}

//14-07-09 GAM SOW 5-2009 1.3.1 chaity code

//Upon selection, update the Pricing Summary on the page

function setmedia(id,desc,pcode,oimage) {
	document.frmExpand.hidemediaid.value=id;
	document.frmExpand.hidemediadesc.value=desc;
	if (document.frmExpand.framedisplay) {
		document.frmExpand.framedisplay.value=oimage;
	}
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	{
		alert ("Your browser does not support AJAX!");
		 return;
	}
	
//Select Frame Options for the selected art Size
	
	var url="arttype.asp";
	url=url+"?artid="+id+"&prodcode="+pcode+"&original="+oimage;
	xmlHttp.onreadystatechange=stateChanged;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

//13-07-09 GAM SOW 5-2009  1.2.2 chaity code

//Upon selection, update the Pricing Summary on the page

function setsubject(obj) {
	val=document.frmExpand.hidesubjectval.value;
	if (val=="incl") {
		val=0;
	}
	document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)-eval(val);
	
	str=obj.options[obj.selectedIndex].text;
	pos=str.search(/Add/);
	if (pos>0) {
		str=str.split(" ");
		document.getElementById("tdsubject").innerHTML=str[0];
		str=str[2];
		document.getElementById("tdsubjectval").innerHTML=str.substr(0,str.length-1);
		document.frmExpand.hidesubjectval.value=str.substr(1,str.length-2);
		val=str.substr(1,str.length-2);
		document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(val);	
	}
	else {
		document.getElementById("tdsubject").innerHTML=str;
		document.getElementById("tdsubjectval").innerHTML="incl";
		document.frmExpand.hidesubjectval.value="incl";
	}
	document.getElementById("spantot").innerHTML="$"+eval(document.frmExpand.hidepricetot.value).toFixed(0);
}

//end GAM SOW 5-2009  1.2.2 chaity code

//20-07-09 GAM SOW 5-2009  1.4 chaity code

//Upon selection, update the Pricing Summary on the page

function selectframe(cid,cframe,cval,pcode,oimage) {
	val=document.frmExpand.artsizevalue.value;
	if (val=="incl") {
		val=0;
	}
	pid=document.frmExpand.artsizeitem.value;
	pframe=document.frmExpand.artsize.value;
	pval=document.frmExpand.artsizevalue.value;
	pspan="f"+pframe.replace("x","");
	cspan="f"+cframe.replace("x","");
	
	document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)-eval(val);
	document.frmExpand.hidemediaval.value=eval(document.frmExpand.hidemediaval.value)-eval(val);
	document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(cval);
	document.frmExpand.hidemediaval.value=eval(document.frmExpand.hidemediaval.value)+eval(cval);
	document.getElementById("spantot").innerHTML="$"+eval(document.frmExpand.hidepricetot.value).toFixed(0);
	document.frmExpand.artsizeitem.value=cid;
	document.frmExpand.artsize.value=cframe;
	document.frmExpand.artsizevalue.value=cval;
	document.getElementById("tdmedia").innerHTML=cframe + "  " + document.frmExpand.hidemediadesc.value;
	if (eval(document.frmExpand.hidemediaval.value)==0) {
		document.getElementById("tdmediaval").innerHTML="incl";
	}
	else {
		document.getElementById("tdmediaval").innerHTML="$"+eval(document.frmExpand.hidemediaval.value).toFixed(0);
	}

	document.getElementById(pspan).innerHTML="<a href='javascript:selectframe(\"" + pid + "\",\"" + pframe + "\"," + pval + ",\"" + pcode + "\",\"" +oimage + "\")'  ALT='$" + eval(pval).toFixed(0) + "' title='$" + eval(pval).toFixed(0) + "'><img src='products/swatchartsize-" + pframe + ".gif' ></a>";
	
	document.getElementById(cspan).innerHTML="<img src='products/swatchartsize-" + cframe + ".gif'  class='imageartselect'  ALT='$" + eval(cval).toFixed(0) + "' title='$" + eval(cval).toFixed(0) + "'>";
	
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	{
		alert ("Your browser does not support AJAX!");
		 return;
	}
	
//Select Frame Options for the selected art Size
	
	var url="artsize.asp";
	url=url+"?art="+cframe+"&media="+document.frmExpand.hidemediadesc.value+"&prodcode="+pcode+"&original="+oimage;
	xmlHttp.onreadystatechange=stateChanged;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

//end GAM SOW 5-2009  1.4chaity code

//20-07-09 GAM SOW 5-2009  1.5 chaity code

//Upon selection, update the Pricing Summary on the page

function selectback(cid,cframe,cval,cimg) {
	val=document.frmExpand.backcost.value;
	if (val=="incl") {
		val=0;
	}
	pid=document.frmExpand.backid.value;
	pframe=document.frmExpand.background.value;
	pval=document.frmExpand.backcost.value;
	pimg=document.frmExpand.backfile.value;
	pspan="b"+pframe;
	cspan="b"+cframe;
	
	document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)-eval(val);
	document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(cval);
	document.getElementById("spantot").innerHTML="$"+eval(document.frmExpand.hidepricetot.value).toFixed(0);
	document.frmExpand.backid.value=cid;
	document.frmExpand.background.value=cframe;
	document.frmExpand.backcost.value=cval;
	document.frmExpand.backfile.value=cimg;
	
	document.getElementById("tdback").innerHTML=cframe;
	if (eval(cval)>0) {
		document.getElementById("tdbackval").innerHTML="$"+eval(cval).toFixed(0);
	}
	else {
		document.getElementById("tdbackval").innerHTML="incl";
	}

	if(pframe=="Artist Choice") {
		document.getElementById(pspan).innerHTML="<a href='javascript:selectback(\"" + pid + "\",\"" + pframe + "\"," + pval + ",\"" + pimg + "\")'  ALT='$" + eval(pval).toFixed(0) + "'  title='$" + eval(pval).toFixed(0) + "' ><img src='" + pimg + "'  width=\"40\" height=\"40\" align=\"left\"></a>";
	}
	else {
		document.getElementById(pspan).innerHTML="<a href='javascript:selectback(\"" + pid + "\",\"" + pframe + "\"," + pval + ",\"" + pimg + "\")'  ALT='$" + eval(pval).toFixed(0) + "'  title='$" + eval(pval).toFixed(0) + "' ><img src='" + pimg + "'  width=\"20\" height=\"20\"></a>";
	}
	if(cframe=="Artist Choice") {
		document.getElementById(cspan).innerHTML="<img src='" + cimg + "' class='imageartselect' ALT='$" + eval(cval).toFixed(0) + "'  title='$" + eval(cval).toFixed(0) + "' width=\"40\" height=\"40\" align=\"left\">";
	}
	else {
		document.getElementById(cspan).innerHTML="<img src='" + cimg + "' class='imageartselect' ALT='$" + eval(cval).toFixed(0) + "'  title='$" + eval(cval).toFixed(0) + "' width=\"20\" height=\"20\">";
	}
	
}

//end GAM SOW 5-2009  1.5chaity code

//20-07-09 GAM SOW 5-2009  1.6 chaity code

//Upon selection, update the Pricing Summary on the page

function selectsize(cid,cframe,cframedesc,cframeimg,cval) {
	val=document.frmExpand.framevalue.value;
	if (val=="incl") {
		val=0;
	}
	pid=document.frmExpand.frameid.value;
	pframe=document.frmExpand.frameimg.value;
	pframedesc=document.frmExpand.framesize.value;
	pframeimg=document.frmExpand.framedisplay.value;
	pval=document.frmExpand.framevalue.value;
	if (pval=="incl") {
		pval=0;
	}

	pspan= "s"+pframe.replace("x","");
	cspan="s"+cframe.replace("x","");
	
	document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)-eval(val);
	document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(cval);
	document.getElementById("spantot").innerHTML="$"+eval(document.frmExpand.hidepricetot.value).toFixed(0);
	document.frmExpand.frameid.value=cid;
	document.frmExpand.frameimg.value=cframe;
	document.frmExpand.framesize.value=cframedesc;
	document.frmExpand.framedisplay.value=cframeimg;
	document.frmExpand.framevalue.value=cval;
	
	document.getElementById("tdframe").innerHTML=cframedesc;
	if (eval(document.frmExpand.framevalue.value)>0) {
		document.getElementById("tdframeval").innerHTML="$"+eval(document.frmExpand.framevalue.value).toFixed(0);
	}
	else {
		document.getElementById("tdframeval").innerHTML="incl";
	}
	document.getElementById("imgframe").innerHTML="<img border=0 src='" + cframeimg + "'  width=348>";

	if (pframe.search(/noframe/)>-1) {
		str="<a href='javascript:selectsize(\"" + pid + "\",\"" + pframe + "\",\"" + pframedesc + "\",\"" + pframeimg + "\",\""  + pval + "\")'   onmouseover=\"document.getElementById('imgframe').innerHTML='<img border=0 src=" + pframeimg + " width=348>'\" onmouseout=\"setlargeimage()\" ALT='$" + eval(pval).toFixed(0) + "'  title='$" + eval(pval).toFixed(0) + "' ><img src='" + pframe + "'  width=\"40\" height=\"40\"></a>";
		document.getElementById(pspan).innerHTML=str;
	}
	else {
		str="<a href='javascript:selectsize(\"" + pid + "\",\"" + pframe + "\",\"" + pframedesc + "\",\"" + pframeimg + "\",\""  + pval + "\")'   onmouseover=\"document.getElementById('imgframe').innerHTML='<img border=0 src=" + pframeimg + " width=348>'\" onmouseout=\"setlargeimage()\" ALT='$" + eval(pval).toFixed(0) + "'  title='$" + eval(pval).toFixed(0) + "' ><img src='" + pframe + "'  width=\"40\" height=\"40\"></a>";
		document.getElementById(pspan).innerHTML=str;
	}
	
	if (cframe.search(/noframe/)>-1) {
		document.getElementById(cspan).innerHTML="<img src='" + cframe + "'  class='imageartselect' ALT='$" + eval(cval).toFixed(0) + "'  title='$" + eval(cval).toFixed(0) + "' width=40  height=40>";
	}
	else {
		document.getElementById(cspan).innerHTML="<img src='" + cframe + "'  class='imageartselect' ALT='$" + eval(cval).toFixed(0) + "'  title='$" + eval(cval).toFixed(0) + "' width=40  height=40>";
	}
}

//end GAM SOW 5-2009  1.6 chaity code

//2407-09 GAM SOW 5-2009  1.7 chaity code

//Upon selection, update the Pricing Summary on the page

function selectProof(pval,cost) {
	val=document.frmExpand.hideproof.value;
	document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)-eval(val);
	document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(cost);
	document.frmExpand.hideproof.value=cost;
	document.getElementById("tdproof").innerHTML=pval;
	document.getElementById("spantot").innerHTML="$"+eval(document.frmExpand.hidepricetot.value).toFixed(0);
	if (eval(cost)>0) {
		document.getElementById("tdproofval").innerHTML="$" + eval(cost).toFixed(0);
	}
	else {
		document.getElementById("tdproofval").innerHTML="incl";
	}
}

//end GAM SOW 5-2009  1.7 chaity code

//2407-09 GAM SOW 5-2009  1.8 chaity code

//Upon selection, update the Pricing Summary on the page

function selectTiming(pval,cost) {
	val=document.frmExpand.hidetiming.value;
	document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)-eval(val);
	document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(cost);
	document.frmExpand.hidetiming.value=cost;
	document.getElementById("tdtiming").innerHTML=pval;
	document.getElementById("spantot").innerHTML="$"+eval(document.frmExpand.hidepricetot.value).toFixed(0);
	if (eval(cost)>0) {
		document.getElementById("tdtimeval").innerHTML="$" + eval(cost).toFixed(0);
	}
	else {
		document.getElementById("tdtimeval").innerHTML="incl";
	}
}

//end GAM SOW 5-2009  1.8 chaity code

//24-07-09 GAM SOW 5-2009  1.9 chaity code

//Upon selection, update the Pricing Summary on the page

function selectDigital(pval,cost) {
	val=document.frmExpand.hidedigital.value;
	document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)-eval(val);
	document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(cost);
	document.frmExpand.hidedigital.value=cost;
	document.getElementById("tddigital").innerHTML=pval;
	document.getElementById("spantot").innerHTML="$"+eval(document.frmExpand.hidepricetot.value).toFixed(0);
	if (eval(cost)>0) {
		document.getElementById("tddigitalval").innerHTML="$" + eval(cost).toFixed(0);
	}
	else {
		document.getElementById("tddigitalval").innerHTML="incl";
	}
}

//end GAM SOW 5-2009  1.9 chaity code

//24-07-09 GAM SOW 5-2009  1.10 chaity code

//Upon selection, update the Pricing Summary on the page

function selectPhoto(pval,cost) {
	val=document.frmExpand.hidephoto.value;
	document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)-eval(val);
	document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(cost);
	document.frmExpand.hidephoto.value=cost;
	document.getElementById("tdphoto").innerHTML=pval;
	document.getElementById("spantot").innerHTML="$"+eval(document.frmExpand.hidepricetot.value).toFixed(0);
	if (eval(cost)>0) {
		document.getElementById("tdphotoval").innerHTML="$" + eval(cost).toFixed(0);
	}
	else {
		document.getElementById("tdphotoval").innerHTML="incl";
	}
}

//end GAM SOW 5-2009  1.10 chaity code

//24-07-09 GAM SOW 5-2009  1.10 chaity code

//Upon selection, update the Pricing Summary on the page

function selectCrop(pval,cost) {
	val=document.frmExpand.hidecrop.value;
	document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)-eval(val);
	document.frmExpand.hidepricetot.value=eval(document.frmExpand.hidepricetot.value)+eval(cost);
	document.frmExpand.hidecrop.value=cost;
	document.getElementById("tdcrop").innerHTML=pval;
	document.getElementById("spantot").innerHTML="$"+eval(document.frmExpand.hidepricetot.value).toFixed(0);
	if (eval(cost)>0) {
		document.getElementById("tdcropval").innerHTML="$" + eval(cost).toFixed(0);
	}
	else {
		document.getElementById("tdcropval").innerHTML="incl";
	}
}

//end GAM SOW 5-2009  1.10 chaity code

function setlargeimage() {
	if (document.frmExpand.framedisplay) {
		document.getElementById('imgframe').innerHTML="<img border=0 src='" +document.frmExpand.framedisplay.value + "' width=348>";
	}
	else {
		document.getElementById('imgframe').innerHTML="<img border=0 src='<%=originalimage%>'  width=348>";
	}
}

function checkform(frm) {
	if (frm.photoprep[1].checked==true) {
		if (frm.photoprepdesc.value.length==0) {
			alert("Please enter Cropping description!");
			frm.photoprepdesc.focus();
			return false;
		}
		else {
			frm.submit();
			return true;
		}
	}
	else {
		frm.submit();
		return true;
	}
}
// -->
