/****************************************************************************
file:			prc-nav-java-v01.js
author:			Kevin Strange -- strange@tol.com
description:	JavaScript for ParaRentar.com
changes:		2006.05.18 - strange@tol.com - Kevin Strange -- Initial code
******************************************************************************/

// Show/Hide layers
var TheBrowserName = navigator.appName;
var TheBrowserVersion = parseFloat(navigator.appVersion);

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_showHideLayers() { //v3.0
	if (!((TheBrowserName == 'Netscape') && (TheBrowserVersion < 5))) {
	var i,p,v,obj,args=MM_showHideLayers.arguments;
	for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
	if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
	obj.visibility=v; }
	}
}

//  Flash check
var MM_contentVersion = 7;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
	var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	for (var i = 0; i < words.length; ++i) {
		if (isNaN(parseInt(words[i])))
			continue;
		var MM_PluginVersion = words[i]; 
	}
	var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
	FlashMode = 0;
	if (navigator.plugins && navigator.plugins.length > 0) {
		if (navigator.plugins["Shockwave Flash"]) {
			var plugin_version = 0;
			var words = navigator.plugins["Shockwave Flash"].description.split(" ");
			for (var i = 0; i < words.length; ++i) {
				if (isNaN(parseInt(words[i])))
					continue;
				plugin_version = words[i];
			}
			if (plugin_version >= 8) {
				var plugin = navigator.plugins["Shockwave Flash"];
				var numTypes = plugin.length;
				for (j = 0; j < numTypes; j++) {
					mimetype = plugin[j];
					if (mimetype) {
						if (mimetype.enabledPlugin && (mimetype.suffixes.indexOf("swf") != -1)) // Mac wierdness
							FlashMode = 1;
						if (navigator.mimeTypes["application/x-shockwave-flash"] == null)
							FlashMode = 0;
					}
				}
			}
		}
	}
	if (FlashMode == 1)
		var MM_FlashCanPlay = true;
	else
		var MM_FlashCanPlay = false;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next \n');
	document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
	document.write('</SCR' + 'IPT\> \n');
}

function openWin( windowURL, windowName, windowFeatures ) {
	return window.open( windowURL, windowName, windowFeatures ) ;
}

