/* $Id: check_db_click.js,v 1.1.2.2 2007/11/16 13:16:31 ferz Exp $ */

 
        function ShowUpload()
    {
      document.getElementById('photos').style.display = 'block';
    
    }
    
  
    
      function HideUpload()
    {
      document.getElementById('photos').style.display = 'none';
    
    }
    
    function checkuseroptionss()
{
    var allInputs2 = document.getElementsByTagName("select");
    var mesg="";
    var qtext=0;
    var imesg=0;
    //alert(allInputs2.length);
    for (var i = 0; i < allInputs2.length; i++) {
	try{
	 
 //alert("textboxvalues3"+allInputs2[i].title+"**"+allInputs2[i].value);
      // if (allInputs2[i].type == "select-one") {
        //alert("textboxvalues3"+allInputs2[i].title);
             // alert(allInputs2[i].id);
               var selObj = document.getElementById(allInputs2[i].id);
   
      val = selObj.options[selObj.selectedIndex].text;
            //  alert("value is"+val);
               if(val=="-")
               {
                 imesg=1;//mesg=mesg+"Please select the product options";  
               }
               if(val)
                   var mySplitResult = val.split("(");
  var url1= mySplitResult[0]; 
   var pname= mySplitResult[1];
   //alert(url1);
   if(url1=="No text")
   {
     qtext=1;
   }
            if(url1=="Upload Image")
            {
              if(document.orderform.fileuploadname.value=="")
            
          mesg=mesg+"Please select the image to proceed \n";     
         
        
              }
              if(url1=="yes " || url1=="yes")
              {
                 if(document.orderform.imagetext.value=="")
            
                 mesg=mesg+"Please provide text for the image\n";   
              }
			  
			  }
			  catch(e){}
			  
           }//for 
           
            var allInputs = document.getElementsByTagName("input");
  
    //alert(allInputs2.length);
   for (var i = 0; i < allInputs.length; i++) {
        if (allInputs[i].type == "text") {
          var str=allInputs[i].value;
          if(qtext==1)
          {
            
          }
          
        }
   }
           if(imesg==1)
           {
              alert("Please select product options to continue \n");
              return false;
           }else{
           if(mesg=="")
           {
             return true;
           }else{
                 alert(mesg);
                return false;
           }
           }
}




