function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		frontpage_08_over = newImage("images/frontpage_08-over.gif");
		frontpage_09_frontpage_08_over = newImage("images/frontpage_09-frontpage_08_o.gif");
		frontpage_09_over = newImage("images/frontpage_09-over.gif");
		frontpage_10_frontpage_09_over = newImage("images/frontpage_10-frontpage_09_o.gif");
		frontpage_10_over = newImage("images/frontpage_10-over.gif");
		frontpage_11_frontpage_10_over = newImage("images/frontpage_11-frontpage_10_o.gif");
		frontpage_11_over = newImage("images/frontpage_11-over.gif");
		preloadFlag = true;
	}
}

function showmouse(linkno)
{
dishtml1 = '<font face="Verdana,Arial,Helvetica" Size="1" color="#0000a5" STYLE="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 8pt; line-height: 10pt;">';
dishtml3 = '</font>';
if (linkno == 1)
{ dishtml2 = 'View Our Great Menu Items'; }
if (linkno == 2)
{ dishtml2 = 'CreekRatz Image Gallery,<br>Area Map & Directions'; }
if (linkno == 3)
{ dishtml2 = 'Our Entertainment Calender.<br>Join our Entertainment E-mail List.'; }
if (linkno == 4)
{ dishtml2 = 'Fun Creekratz Collectables'; }
if (linkno == 5)
{ dishtml2 = 'Creekratz Home'; }
mdisplay.innerHTML = dishtml1+dishtml2+dishtml3;
}
function hidemouse()
{
mdisplay.innerHTML = '';
}
function openvideo(dest,ww,hh) {
tx = (screen.width - ww) / 2;
ty = (screen.height - hh) / 2; // - 280; //) / 2;

	 addWindow = window.open(dest,"video","width="+ww+",height="+hh+ ",top="+ty+",left="+tx+",titlebar=0,location=0,resizable=1,status=0,menubar=0,scrollbars=0,fullscreen=0");
	 addWindow.focus() 
}
function soon()
{
alert('This Feature is Coming Soon!');
}

//Thumbnail image viewer- 
var ie=document.all
var ns=document.layers
var ns6=document.getElementById&&!document.all

function enlarge(which,e,h,v){
//Render image code for IE 4+ and NS6
if (ie||ns6){
crossobj=document.getElementById? document.getElementById("showimage") : document.all.showimage
if (crossobj.style.visibility=="hidden"){
if (h)
//{ crossobj.style.left=h; }
{ crossobj.style.left=ns6? pageXOffset+e.clientX - h : document.body.scrollLeft+event.clientX - h; }
else
{ crossobj.style.left=ns6? pageXOffset+e.clientX : document.body.scrollLeft+event.clientX; }
if (v)
//{ crossobj.style.top=v; }
{ crossobj.style.top=ns6? pageYOffset+(e.clientY - v) : document.body.scrollTop+(event.clientY - v) }
else
{ crossobj.style.top=ns6? pageYOffset+(e.clientY) : document.body.scrollTop+(event.clientY) }

crossobj.innerHTML='<div align="right" id="drag" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 8pt; color: #800000; background-color: #FFFF9f; cursor:hand;"><b onClick=closepreview()>CLOSE</b></div><img src="'+which+'">'
crossobj.style.visibility="visible"
}
else
crossobj.style.visibility="hidden"
return false
}
//Render image code for NS 4
else if (document.layers){
if (document.showimage.visibility=="hide"){
document.showimage.document.write('<a href="#" onMouseover="drag_dropns(showimage)"><img src="'+which+'" border=0></a>')
document.showimage.document.close()
if (h)
{ document.showimage.left=h; }
else
{ document.showimage.left=e.x; }
if (v)
{ document.showimage.top=v; }
else
{ document.showimage.top=(e.y - 50); }
document.showimage.visibility="show"
}
else
document.showimage.visibility="hide"
return false
}
//if NOT IE 4+ or NS 4, simply display image in full browser window
else
return true
}

function closepreview(){
crossobj.style.visibility="hidden"
}
function hidens() {
document.showimage.visibility=="hide"
return true
}



//drag drop function for NS 4////
/////////////////////////////////

var nsx,nsy,nstemp

function drag_dropns(name){
temp=eval(name)
temp.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP)
temp.onmousedown=gons
temp.onmousemove=dragns
temp.onmouseup=stopns
}

function gons(e){
temp.captureEvents(Event.MOUSEMOVE)
nsx=e.x
nsy=e.y
}
function dragns(e){
temp.moveBy(e.x-nsx,e.y-nsy)
return false
}

function stopns(){
temp.releaseEvents(Event.MOUSEMOVE)
}

//drag drop function for IE 4+ and NS6////
/////////////////////////////////

function drag_drop(e){
if (ie&&dragapproved){
crossobj.style.left=tempx+event.clientX-offsetx
crossobj.style.top=tempy+event.clientY-offsety
}
else if (ns6&&dragapproved){
crossobj.style.left=tempx+e.clientX-offsetx
crossobj.style.top=tempy+e.clientY-offsety
}
return false
}

function initializedrag(e){
if (ie&&event.srcElement.id=="drag"||ns6&&e.target.id=="drag"){
offsetx=ie? event.clientX : e.clientX
offsety=ie? event.clientY : e.clientY

tempx=parseInt(crossobj.style.left)
tempy=parseInt(crossobj.style.top)

dragapproved=true
document.onmousemove=drag_drop
}
}

document.onmousedown=initializedrag
document.onmouseup=new Function("dragapproved=false")

//#######################################################
/***********************************************
* AnyLink Vertical Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="schedule.asp">Murrells Inlet Entertainment</a>'
menu1[1]='<a href="flschedule.asp">Florence Entertainment</a>'
		
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var horizontaloffset=-30 //horizontal offset of menu from default location. (0-5 is a good value)

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width: 160px" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x-obj.offsetWidth < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure+obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move menu up?
edgeoffset=dropmenuobj.contentmeasure-obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either? (position at top of viewable window then)
edgeoffset=dropmenuobj.y
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+obj.offsetWidth+horizontaloffset+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}
function openwin(d,w,h,s) {
tx = (screen.width - w) / 2;
ty = (screen.height - h) / 2;

	 addWindow = window.open(d,"popup","width="+w+",height="+h+",top="+ty+",left="+tx+",titlebar=0,resizable=1,status=0,menubar=0,scrollbars="+s+",fullscreen=0");
	 addWindow.focus() 
}
