<!--

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


function launchDOE(dID){thewindow = window.open('/pop/doe.asp?ref='+dID+'', 'IA', config='height=400,width=600,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no,directories=no,status=no,screeny=100,screenx=100,left=200,top=200');
 }
function launchUncrop(iID,iType){thewindow = window.open('/popUncrop.asp?i_id='+iID+'&i_type='+iType+'', 'IAuncrop', config='height=600,width=800,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no,directories=no,status=no');
 }
function launchEmail(cID,pID){thewindow = window.open('/email.asp?c_id='+cID+'&p_id='+pID+'', 'Email', config='height=300,width=400,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no,directories=no,status=no');
 }
function launchIntro(pID){thewindow = window.open('/introduction.asp?p_id='+pID+'', 'IAIntro', config='height=600,width=640,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,directories=no,status=no,screeny=0,screenx=0,left=0,top=0');
 }
function launchSitemap(){
	thewindow = window.open('/sitemap.asp', 'Sitemap', config='height=700,width=1000,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,directories=no,status=no,screeny=0,screenx=0,left=0,top=0');
 }
function validate_form() {
	with(document.clubb){
//		if(isWhitespace(Designation.value, "Enter a title")){
//				Designation.focus();
//				return false;			
//		}
		if(isWhitespace(firstname.value, "Enter a first name")){
		
				firstname.focus();
				alert("Enter your first name")
				return false;			
		}
		if(isWhitespace(lastname.value, "Enter a last name")){
				lastname.focus();
				alert("Enter your last name")
				return false;			
		}
//		if(isWhitespace(Company.value, "Enter a Company")){
//				Company.focus();
//				return false;			
//		}																				
					if(valEmail(EmailAddress)) 
						{
							return false;
						}					
	}	
    return true;
}
 
 function containsChars(xvar)
	{
		for (k=0;k<xvar.length;k++)
			{
				if(isNaN(xvar.charAt(k))) return true;
			}
		return false;			
	}
	
	function isWhitespace (s)
		{   
			var i;
			// whitespace characters
			var whitespace = " \t\n\r";

		    // Is s empty?
		    if (isEmpty(s)) return true;

		    // Search through string's characters one by one
			// until we find a non-whitespace character.
		    // When we do, return false; if we don't, return true.

		    for (i = 0; i < s.length; i++)
			    {   
			        // Check that current character isn't whitespace.
			        var c = s.charAt(i);

			        if (whitespace.indexOf(c) == -1) return false;
			    }

		    // All characters are whitespace.
		    return true;
		}		
		
	function isEmpty(s)
		{   
			return ((s == null) || (s.length == 0));
		}		
	
								
function valEmail(el) {
	var invalidChars = " /:,;";
 	if (el.value == "") {
   		alert("Please enter your email address.");
		el.focus();
		return (true);
	}
	for (i=0; i<invalidChars.length; i++) {
		badChar = invalidChars.charAt(i);
    	if (el.value.indexOf(badChar,0) != -1) {
		   	alert("Your email address contains an invalid character, please correct it.");
			el.focus();
			return (true);
	    }
	}
	atPos = el.value.indexOf("@",1);
	if (atPos == -1) {
	   	alert("Your email address must contain an @ character.");
		el.focus();
		return (true);
	}
	if (el.value.indexOf("@",atPos+1) != -1) {
	   	alert("Your email address must have letters before the @ character.");
		el.focus();
		return (true);
	}
	periodPos = el.value.indexOf(".",atPos);
	if (periodPos == -1) {
	   	alert("Your email address must contain a . character.");
		el.focus();
		return (true);
	}
	if (periodPos+3 > el.value.length) {
	   	alert("Your email address must have letters after the . character.");
		el.focus();
		return (true);
	}
	return (false);
}

var xmlHttp
// OTHER ITEMS
function showOtherItem(str,oType)
{
if (str.length==0)
  { 
  document.getElementById("txtItem").innerHTML="";
  return;
  }
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="/contentOtherItemAJAX.asp";
url=url+"?i_id="+str;
url=url+"&o_type="+oType;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChangedOtherItem;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
} 

function stateChangedOtherItem() 
{ 
if (xmlHttp.readyState==4)
{ 
document.getElementById("txtItem").innerHTML=xmlHttp.responseText;
}
}

// ITEMS
function showItem(str,medID)
{
if (str.length==0)
  { 
  document.getElementById("txtItem").innerHTML="";
  return;
  }
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="/contentItemAJAX.asp";
url=url+"?i_id="+str;
url=url+"&m_id="+medID;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
} 

function stateChanged() 
{ 
if (xmlHttp.readyState==4)
{ 
document.getElementById("txtItem").innerHTML=xmlHttp.responseText;
}
}

// LIST
function showProjectList(str)
{
if (str.length==0)
  { 
  document.getElementById("txtProjectList").innerHTML="";
  return;
  }
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="/listProjectsAJAX.asp";
url=url+"?p_id="+str;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChangedList;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
} 

function stateChangedList() 
{ 
if (xmlHttp.readyState==4)
{ 
document.getElementById("txtProjectList").innerHTML=xmlHttp.responseText;
}
}

// THUMBS LINK
function refreshProject(pid,pgnum){
	document.location.href="vault.asp?p_id="+pid+"&pgnum="+pgnum
//	showThumb(pid,1,1);
//	showProjectList(pid);
}

// THUMBS
function showThumb(p_str,m_str,pagenum_str)
{
if (p_str.length==0)
  { 
  document.getElementById("txtThumb").innerHTML="";
  return;
  }
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="/contentThumbAJAX.asp";
url=url+"?p_id="+p_str;
url=url+"&m_id="+m_str;
url=url+"&thnum="+pagenum_str;
url=url+"&sid="+Math.random();
//alert(url)
xmlHttp.onreadystatechange=stateChangedThumb;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
} 

function stateChangedThumb() 
{ 
if (xmlHttp.readyState==4)
{ 
document.getElementById("txtItem").innerHTML="";
document.getElementById("txtThumb").innerHTML=xmlHttp.responseText;
}
}

// OTHER THUMBS
function showOtherThumb(p_str,o_str)
{
if (p_str.length==0)
  { 
  document.getElementById("txtThumb").innerHTML="";
  return;
  }
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="/contentThumbAJAX.asp";
url=url+"?p_id="+p_str;
url=url+"&o_id="+o_str;
url=url+"&thnum="+pagenum_str;
url=url+"&sid="+Math.random();
//alert(url)
xmlHttp.onreadystatechange=stateChangedOtherThumb;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
} 

function stateChangedOtherThumb() 
{ 
if (xmlHttp.readyState==4)
{ 
document.getElementById("txtItem").innerHTML="";
document.getElementById("txtThumb").innerHTML=xmlHttp.responseText;
}
}


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 msOvr(src){
			src.style.backgroundColor = "#F8F8F8";
			src.style.cursor="hand";
		}
		
		function msOut(src){
			src.style.backgroundColor = "#FFFFFF";
		}
		
		function msUp(src){
			src.style.backgroundColor = "#FFFFFF";
		}
		
		function msDown(src){
			src.style.backgroundColor = "#F8F8F8";
		}
		function ftmsOvr(src,title){
			src.style.cursor = 'hand';
			src.style.textDecoration = 'Underline';
			window.status = title;
		}
		function ftmsout(src){
			src.style.textDecoration = 'none';
			window.status = '';
		}
		
// THUMBS		
		function msOvrT(src){
			src.style.backgroundColor = "#ABABAB";
			src.style.cursor="hand";
		}
		
		function msOutT(src){
			src.style.backgroundColor = "#FFFFFF";
		}
		
		function msUpT(src){
			src.style.backgroundColor = "#FFFFFF";
		}
		
		function msDownT(src){
			src.style.backgroundColor = "#ABABAB";
		}
// END THUMBS
		
		function msOvrO(src){
			src.style.backgroundColor = "#848484";
			src.style.cursor="hand";
		}
		
		function msOutO(src){
			src.style.backgroundColor = "#5B5B5B";
		}
		
		function msUpO(src){
			src.style.backgroundColor = "#5B5B5B";
		}
		
		function msDownO(src){
			src.style.backgroundColor = "#848484";
		}
		function ftmsOvrO(src,title){
			src.style.cursor = 'hand';
			src.style.textDecoration = 'Underline';
			window.status = title;
		}
		function ftmsoutO(src){
			src.style.textDecoration = 'none';
			window.status = '';
		}

 
//-->
