document.write('<script type=\"text/javascript\" src=\"/assets/flash/embedFlash.js\"></script>');
function submitPaypalForm(){

	document.PremiumServicesFormBean.submit();
	
}
function trim(string){
   //Remove leading spaces
   while(string.charAt(0) == " ")
      string = string.substring(1, string.length);

   //Remove trailing spaces
   while(string.charAt(string.length-1) == " ")
      string = string.substring(string, string.length-1);

   return string;
}
function changeYear(year){
	document.PriceSelectForm.years.value=year;
}
function MM_showHideLayers(obj) {
    document.getElementById(obj).style.display='none';
	}
	
	
	function selectGalleryFormSubmit(path){
	
	var x=false;
	
       
      if(document.forms[0].galleryID.length){  
	for (var i=0; i < document.forms[0].galleryID.length; i++)
   {
 
  
  	 if (document.forms[0].galleryID[i].checked)
      {
      x=true;
      }
   }
   }else if(document.forms[0].galleryID.checked){
   x=true;
   }
   
  

 if(x==false){
document.getElementById("error").style.display='block';
document.getElementById("errorContent").style.height="23px";
document.getElementById("errorContent").innerHTML='Select a gallery';
}else{
document.forms[0].action=path;
document.forms[0].submit();
}
}

function selectPortfolioFormSubmit(path){
	var x=false;
	
        
	for (var i=0; i < document.forms[0].portfolioID.length; i++)
   {
  
  	 if (document.forms[0].portfolioID[i].checked)
      {
      x=true;
      }
   }
   
  

 if(x==false){
document.getElementById("error").style.display='block';
document.getElementById("errorContent").style.height="23px";
document.getElementById("errorContent").innerHTML='Select a portfolio';
}else{
document.forms[0].action=path;
document.forms[0].submit();
}
}
/*function reorderBySequence(){
document.getElementById("imagesequence").style.display="block";




document.getElementById("imagesequence").innerHTML=x;
}

function reorderByName(){
}
function reorderByMostRecent(){
}*/
function playVideo(file){
		document.getElementById("videofile").style.display='block';
		document.getElementById("objectDivID").innerHTML = "Loading...";
		var oeTags = getFlashVideoPlayerObject(file)
		document.getElementById("objectDivID").innerHTML = oeTags;
}
			function MM_showHideLayers(obj) {
				if(document.getElementById("objectDivID")){
					document.getElementById("objectDivID").innerHTML = "";
				}
		    	document.getElementById(obj).style.display='none';
			}
			
			
			 function makepage(src)
			{
			   return "<html>\n" +
			    "<head>\n" +
			    "<title>Temporary Printing Window</title>\n" +
			    "<script>\n" +
			    "function step1() {\n" +
			    "  setTimeout('step2()', 10);\n" +
			    "}\n" +
			    "function step2() {\n" +
			    "  window.print();\n" +
			    "  window.close();\n" +
			    "}\n" +
			    "</scr" + "ipt>\n" +
			    "</head>\n" +
			    "<body onLoad='step1()'>\n" +
			    "<img src='" + src + "'/>\n" +
			    "</body>\n" +
			    "</html>\n";
			}
			
			function printme(src)
			{
			  link = "about:blank";
			  var pw = window.open(link, "_new");
			  pw.document.open();
			  pw.document.write(makepage(src));
			  pw.document.close();
			}