/*****************************************
* Dissolving Image Rollover- By Roy Whittle (http://www.javascript-fx.com/)
* Featured on/available at http://www.dynamicdrive.com/
* This notice must stay intact for use
*****************************************/

//Generate transition CSS (transition=0 to 23 12 1, 3=out from center, 4=up 5=down 6=left 7)
document.write('<STYLE TYPE="text/css">.imgTrans{ filter:revealTrans(duration=0.3,transition=6) }</STYLE>');

//Uncomment the next line for fading rollovers instead of dissolving:
//document.write('<STYLE TYPE="text/css">.imgTrans{ filter:blendTrans(duration=0.4) }</STYLE>');

var onImages=new Array();
function Rollover(imgName, imgSrc)
{
	onImages[imgName] = new Image();
	onImages[imgName].src = imgSrc;
}

function turnOn(imgName){ 
	if(document.images[imgName].filters != null)
		document.images[imgName].filters[0].apply();
	document.images[imgName].offSrc = document.images[imgName].src;
	document.images[imgName].src    = onImages[imgName].src;
	if(document.images[imgName].filters != null)
		document.images[imgName].filters[0].play();
}

function turnOff(imgName){ 
	if(document.images[imgName].filters != null)
		document.images[imgName].filters[0].stop();
	document.images[imgName].src = document.images[imgName].offSrc;
}

//Specify name of participating images, plus paths to their onMouseover replacements:
Rollover("link1",  "images/home_on.gif");
Rollover("link2",  "images/overview_on.gif");
Rollover("link3",  "images/features_on.gif");
Rollover("link4",  "images/floorplans_on.gif");
Rollover("link5",  "images/location_on.gif");
Rollover("link6",  "images/contact_on.gif");


function pwin(d,w,h,s,p,n) {
// p position, s = scrollbars
// 1 = top left, 2 = top right, 3 = bottom left, 4 = bottom right, 0 = center

if (p == 1) {
tx = 10; 
ty = 10;
}
else
if (p == 2) {
tx = (screen.width - (w+10));
ty = 0;
}
else
if (p == 3) {
tx = 10;
ty = (screen.height - (h+65));
}
else
if (p == 4) {
tx = tx = (screen.width - (w+10));
ty = (screen.height - (h+65));
}
else
if (p == 5) {
tx = 10;
ty = (screen.height - h) / 2;
w = (screen.width - 30);
}
else {
tx = (screen.width - w) / 2;
ty = (screen.height - h) / 2;
}
if (n) {
wname = n;
}
else {
wname = "popup";
}
	 nWindow = window.open(d,wname,"width="+w+",height="+h+",top="+ty+",left="+tx+",titlebar=0,resizable=1,status=0,menubar=0,scrollbars="+s+",fullscreen=0");
	 nWindow.focus() 
}
function go(fm){
var menObj=fm.quicklink;
if (menObj.options[menObj.selectedIndex].value != "")
{
var dest = menObj.options[menObj.selectedIndex].value;
var dtest = /^http\:/i;
var result = dest.match(dtest)
if (result != null)
{
Newwindow = window.open(); Newwindow.location = dest;
}
else
{ window.location = dest; }
}
}

function confirmit() {
if (confirm(""))
{
document.location="default.html"
}

}
//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; }
else
{ crossobj.style.left=ns6? pageXOffset+e.clientX : document.body.scrollLeft+event.clientX; }
if (v)
{ crossobj.style.top=v; }
else
{ crossobj.style.top=ns6? pageYOffset+(e.clientY - 150) : document.body.scrollTop+(event.clientY - 50) }

crossobj.innerHTML='<div align="right" id="drag" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 8pt; color:#000080; background-color: #87ceeb; 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
}
}
function later() {
alert('Coming Soon!');
}
