<!--
// dmi www site javascript global functions

//
// code to break out of frames if we are locked into someone else's web site...
onLoad="if(parent.frames.length!=0)top.location='index0.html';"

//
// disable right click functions
function click(e)
	{
	if (document.all)
		{
		if (event.button == 2)
			{
			alert(message);
			return false;
			}
		}
	if (document.layers)
		{
		if (e.which == 3)
			{
			alert(message);
			return false;
			}
		}
	}
if (document.layers)
	{
	document.captureEvents(Event.MOUSEDOWN);
	}
var message="\nNOTICE!  All original images and text are placed on this web site "
	   +"for the personal viewing of perspective\nclients of Phantasy Fotos. "
	   +" Any unauthorized use of this, or any other copyrighted material, ma"
	   +"y result \nin criminal and/or civil litigation!!\n\n"
	   +"\n               All materials and images are (c)Phantasy Fotos"
	   +" and Danmar Imaging!!!\n"
document.onmousedown=click;

//
// code for the status bar scroller functions
var x = 0
var y = 0
var z = 140
var delay = 70
var text = "Phantasy Fotos public access area.  All images and mat"
	+"erials are protected by copyright, and are placed for persona"
	+"l viewing only!  E-mail danmar_imaging@email.com for info...."
while (y ++ < z)
	{
	text = " " + text
	}
function scroller()
	{
	window.status = text.substring(x++, text.length);
	if (x == text.length)
		{
		x = 0;
		}
	setTimeout("scroller()", delay);
	}
scroller();

//
// code for basic cookie functions...
var DANMAR = 0
var MINAGEVALUE = 99
function makeCookie(Name,Value,Expiry,Path,Domain,Secure)
	{
	if (Expiry != null)
		{
		var datenow = new Date();
		datenow.setTime(datenow.getTime() + Math.round(86400000*Expiry));
		Expiry = datenow.toGMTString();
		}
	Expiry = (Expiry != null) ? '; expires='+Expiry : '';
	Path = (Path != null)?'; path='+Path:'';
	Domain = (Domain != null) ? '; domain='+Domain : '';
	Secure = (Secure != null) ? '; secure' : '';
	document.cookie = Name + '=' + escape(Value) + Expiry + Path + Domain + Secure;
	}
function readCookie(Name)
	{
	var cookies = document.cookie;
	if (cookies.indexOf(Name + '=') == -1) return null;
	var start = cookies.indexOf(Name + '=') + (Name.length + 1);
	var finish = cookies.substring(start,cookies.length);
	finish = (finish.indexOf(';') == -1) ? cookies.length : start + finish.indexOf(';');
	return unescape(cookies.substring(start,finish));
	}

//
// code and function for new image windows
var newWind
var lOpened=false
function openwindow(cPicture,nWidth,nHeight,cMessage,nBorder)
	{
	var output
	if (lOpened)
		{
		newWind.close();
		}
	lOpened=true;
	newWind=window.open("","winnam","HEIGHT="+nHeight+",WIDTH="+nWidth+",scrollbars=yes,resizable=yes,top=2,left=2");
	output="<HTML><BODY BGCOLOR='black'><CENTER>"
 	output+="<FONT FACE='Comic Sans MS' SIZE='+2' COLOR='Blue'><B>"+cMessage+"</B></FONT><BR>"
	if (nBorder==1)
		{
		output+="<TABLE BORDER='8'><TR><TD>"
		}
	output+="<IMG SRC='"+cPicture+"'>"
	if (nBorder==1)
		{
		output+="</TD></TR></TABLE>"
		}
	output+="<FORM><TABLE BORDER='5'><TR><TD><INPUT TYPE='button' VALUE='Please close this window to select next image!' onClick='self.close()'>"
	output+="</TD></TR></TABLE></FORM></CENTER></BODY></HTML>"
	newWind.document.write(output);
	newWind.document.close();
	lOpened=false
	}
//-->