<!--

function MM_displayStatusMsg(msgStr) 
	{ //v1.0
  		status=msgStr;
  		document.MM_returnValue = true;
	}

//FORM HIGHLIGHING ELEMENT
var highlightcolor="lightyellow"

var ns6=document.getElementById&&!document.all
var previous=''
var eventobj

//Regular expression to highlight only form elements
var intended=/INPUT|TEXTAREA|SELECT|OPTION/

//Function to check whether element clicked is form element
function checkel(which)
	{
		if (which.style&&intended.test(which.tagName))
		{
			if (ns6&&eventobj.nodeType==3)
			eventobj=eventobj.parentNode.parentNode
			return true
		}

		else
		return false
	}

//Function to highlight form element
function highlight(e)
	{
		eventobj=ns6? e.target : event.srcElement
		if (previous!='')
		{
			if (checkel(previous))
			previous.style.backgroundColor=''
			previous=eventobj
			if (checkel(eventobj))
			eventobj.style.backgroundColor=highlightcolor
		}
		else
		{
			if (checkel(eventobj))
			eventobj.style.backgroundColor=highlightcolor
			previous=eventobj
		}
	}


//NO RIGHT CLICK
var message="";

function clickIE() 
	{
		if (document.all) 
		{
			(message);return false;
		}
	}

function clickNS(e) 
	{
		if (document.layers||(document.getElementById&&!document.all)) 
		{
			if (e.which==2||e.which==3) 
			{
				(message);return false;
			}
		}
	}
if (document.layers) 
	{
		document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;
	}

else
	{
		document.onmouseup=clickNS;document.oncontextmenu=clickIE;
	}

document.oncontextmenu=new Function("return false")
/*
//NO TEXT SELECT
function disableselect(e)
	{
		return false
	}

function reEnable()
	{
		return true
	}

//if IE4+
document.onselectstart=new Function ("return false")

//if NS6
if (window.sidebar)
	{
		document.onmousedown=disableselect
		document.onclick=reEnable
	}
*/

function RandomImageLong(images,iparams)

	{
		/* si: start index
		** i: current index
		** ei: end index
		** cc: current count
		*/
		      si = 0;
		      ci = 0;
		      cc = 0;
		imageSet = new Array();
		      ei = images.length;
for (i=1;i<ei;i++) 
		{
			if (images.charAt(i) == ' ' || images.charAt(i) == ',')
			{
				imageSet[cc] = images.substring(si,i);
				cc++;
				si=i+1;
			}
		}

ind = Math.floor(Math.random() *cc);
document.writeln("<img "+iparams+" src="+imageSet[ind]+" alt=\""+imageSet[ind]+"\">");

	}

function RandomImage(images)
	{
		RandomImageLong(images," ");
	}

function RandomImageLinkLongTarget(images,urls,iparams,hparams)
	{
		/* si: start index
		** i: current index
		** ei: end index
		** cc: current count
		*/
		imageSet = new Array();
		urlSet = new Array();
		si = 0;
		ci=0;
		cc=0;
		ei = images.length;
		for (i=1;i<ei;i++)
		{
			if (images.charAt(i) == ' ' || images.charAt(i) == ',')
			{
				imageSet[cc] = images.substring(si,i);
				cc++;
				si=i+1;
			}
		}

		ind = Math.floor(Math.random() *cc);
		si = 0;
		ci=0;
		cc=0;
		ei = urls.length;
		for (i=1;i<ei && cc <=ind ;i++) 
		
		{
			if (urls.charAt(i) == ' ' || urls.charAt(i) == ',') 
			{
				urlSet[cc] = urls.substring(si,i);
				cc++;
				si=i+1;
			}
		}

		document.writeln("<a "+hparams+" href=\""+urlSet[ind]+"\"><img "+iparams+" src="+imageSet[ind]+" alt=\""+imageSet[ind]+"\"></a>");
	}

function RandomImageLinkLong(images,urls,iparams)
	{
		RandomImageLinkLongTarget(images,urls,iparams,"");
	}

function RandomImageLink(images,urls)
	{
		RandomImageLinkLongTarget(images,urls,"border=0","");
	}


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];
			}
		}
	}

var content=new Array()

function regenerate()
	{
		window.location.reload()
	}

function regenerate2()
	{
		if (document.layers)
		{
			appear()
			setTimeout("window.onresize=regenerate",450)
		}
	}

function changetext(whichcontent)
	{
		if (document.all||document.getElementById)
		{
			cross_el=document.getElementById? document.getElementById("descriptions"):document.all.descriptions
			cross_el.innerHTML='<font face="Verdana"><small>'+whichcontent+'<font></small>'
		}
		
		else if (document.layers)
		{
			document.d1.document.d2.document.write('<font face="Verdana"><small>'+whichcontent+'</small>')
			document.d1.document.d2.document.close()
		}
	}

function appear()
	{
		document.d1.visibility='show'
	}


function MM_findObj(n, d) 
	{ //v4.01
		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 && d.getElementById) x=d.getElementById(n); return x;
	}

function MM_validateForm() 
	{ //v4.0
		var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
		for (i=0; i<(args.length-2); i+=3) 
		{ 
			test=args[i+2]; val=MM_findObj(args[i]);
			if (val) 
			{ 
				nm=val.name; if ((val=val.value)!="")
				{
					if (test.indexOf('isEmail')!=-1) 
					{ 
						p=val.indexOf('@');
						if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
					} 
					else if (test!='R')
					{
						if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
						if (test.indexOf('inRange') != -1) 
						{ 
							p=test.indexOf(':');
							min=test.substring(8,p); max=test.substring(p+1);
							if (val<min || max<val) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
						}
					}
				} else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n';
			}
		} 
		if (errors) alert('The following error(s) occurred:\n'+errors);
		document.MM_returnValue = (errors == '');
	}
//-->