function topMenu(menuId,id)
{
	var obj = document.getElementById(menuId)
	if (id==1)
	{
	obj.style.visibility = 'visible';
	obj.style.display = 'block';
	}
	
	if (id==0)
	{
	obj.style.visibility = 'hidden';
	obj.style.display = 'none';
	}
}

function faq_function(new_one, Question)
{		
	document.getElementById(Question).style.display = "none";
	document.getElementById(new_one).style.display = "block";	
	last_div=new_one
	last_question=Question
}


function WindowOpen(address)
{
	window.open(address,"BigPic","scrollbars=0,resizable=1,toolbar=0,status=0,location=0,menubar=0")
}


function opentable()
{
	window.open("BigPic2.asp","umal","width=600,height=609,top=250,left=400,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=no,status=no");
}


last_menu = null
function show_sub(MessageID)
{
if (eval("document.all.sub_menu" + MessageID))
	{
	if (eval("sub_menu" + MessageID + ".style.display=='none'"))
		{
		eval("sub_menu" + MessageID + ".style.display='block'")
		}
	else
		{
		eval("sub_menu" + MessageID + ".style.display='none'")
		}
	}
}

function openPic(picid)
{
	window.open("BigPic.asp?PicID="+picid,"umal","width=600,height=609,top=250,left=400,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=no,status=no");
}

function Changebigpic(File,id)
{
	var obj = document.getElementById('bigimg');
	bla = 'imgborder'+id;
	var borderobj = document.getElementById(bla); 
	
	Path ="uploaded/" + File;
	obj.src = Path;
	borderobj.style.border='1px solid #60563d';
	
}

function borderchange(id)
{
	bla = 'imgborder'+id;
	var borderobj = document.getElementById(bla); 
	
	borderobj.style.border='1px solid #ffffff';
	
}


function CheckOrder ()
{	
	if (document.orders.Name.value == "" ) //
	{
		alert ("Name or Company Name are required")
		orders.Name.focus()		
	}

	
	else if (orders.SuffixTel.value == "" || orders.Tel.value == "" ) //
	{
		alert ("TelePhone is required")	
					
	}
	
	else if (IsNumeric(document.orders.SuffixTel.value) == false || IsNumeric(document.orders.Tel.value) == false ) 
      {
      alert("Please check - non numeric value!");
      }
	
	else
	
	{ 
		if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(orders.Email.value))
		{
			document.orders.submit()		
			return true;
		}
		else
		{
			alert("Email is not Valid")
		}
	}	
}

function IsNumeric(strString)
   //  check for valid numeric strings	
   {
   var strValidChars = "0123456789.-";
   var strChar;
   var blnResult = true;

   if (strString.length == 0) return false;

   //  test strString consists of valid characters listed above
   for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
         blnResult = false;
         }
      }
   return blnResult;
   }

