//var DR_DOC_ROOT="http://hx2.1/";
//var DR_DOC_ROOT="http://www.secondhandboatsforsale.com/";
if(location.protocol=="https:")
{
var DR_DOC_ROOT="https://www.homeforexchange.com/";
}
else
{
var DR_DOC_ROOT="http://www.homeforexchange.com/";
}

function openwindow(strPathFile, strWinParams)
{
	window.open(strPathFile, "", strWinParams);
}
function Trim(s) 
{
  // Remove leading spaces and carriage returns
  
  while ((s.substring(0,1) == ' ') || (s.substring(0,1) == '\n') || (s.substring(0,1) == '\r'))
  {
    s = s.substring(1,s.length);
  }
  // Remove trailing spaces and carriage returns
  while ((s.substring(s.length-1,s.length) == ' ') || (s.substring(s.length-1,s.length) == '\n') || (s.substring(s.length-1,s.length) == '\r'))
  {
    s = s.substring(0,s.length-1);
  }
  return s;
}
function chkAll(frm)
{
	var obj;
		obj="document."+frm;
		//alert(eval(obj).elements.length);
	for(var i=0;i<eval(obj).elements.length;i++)
	{
		if(eval(obj).elements[i].name.substr(0,6)=="chkBox")
		{
			if(eval(obj).cx.checked==false)	eval(obj).elements[i].checked=false;
			else if(eval(obj).cx.checked==true) eval(obj).elements[i].checked=true;
		}
	}
}
function chkDelete(frm,homelot)
{
	var obj;
		obj="document."+frm;
	var tcbx=0;var tckbxs=0;
	for(var i=0;i<(eval(obj).elements.length);i++)
	{		
		if(eval(obj).elements[i].type=="checkbox") tcbx++;
		if(eval(obj).elements[i].type=="checkbox" && eval(obj).elements[i].checked==false) tckbxs++;
	}
	if(tcbx==tckbxs)
	{
		alert("Please Choose At Least one "+ homelot +" for deletion.");
		return false;
	}
	else
	{
		if(confirm("Are you sure you would like to remove these "+ homelot +"?")) return true;
		else 
		{
			for(var i=0;i<(eval(obj).elements.length);i++)
			{
				eval(obj).elements[i].checked=false;
			}
			return false;
		}
	}
}
function chkDeleteActDeact(frm,homelot,actlot)
{
	var obj;
		obj="document."+frm;
	var tcbx=0;var tckbxs=0;
	for(var i=0;i<(eval(obj).elements.length);i++)
	{		
		if(eval(obj).elements[i].type=="checkbox") tcbx++;
		if(eval(obj).elements[i].type=="checkbox" && eval(obj).elements[i].checked==false) tckbxs++;
	}
	if(tcbx==tckbxs)
	{
		alert("Please Choose At Least one "+ homelot +" for "+actlot+".");
		return false;
	}
	else
	{
		if(confirm("Are you sure you would like to "+actlot+" these "+ homelot +"?")) return true;
		else 
		{
			for(var i=0;i<(eval(obj).elements.length);i++)
			{
				eval(obj).elements[i].checked=false;
			}
			return false;
		}
	}
}


function chkLink(frm,homelot)
{
	var obj;
		obj="document."+frm;
	var tcbx=0;var tckbxs=0;
	for(var i=0;i<(eval(obj).elements.length);i++)
	{		
		if(eval(obj).elements[i].type=="checkbox") tcbx++;
		if(eval(obj).elements[i].type=="checkbox" && eval(obj).elements[i].checked==false) tckbxs++;
	}

	if(tcbx==tckbxs)
	{
		alert("Please Choose At Least one "+ homelot +" for linking.");
		return false;
	}
	else
	{
		if(confirm("Are you sure you would like to link these "+ homelot +"?")) return true;
		else 
		{
			for(var i=0;i<(eval(obj).elements.length);i++)
			{
				eval(obj).elements[i].checked=false;
			}
			return false;
		}
	}
}
function chkProperty(frm,homelot)
{
	var obj;
		obj="document."+frm;
	var tcbx=0;var tckbxs=0;
	for(var i=0;i<(eval(obj).elements.length);i++)
	{		
		if(eval(obj).elements[i].type=="checkbox") tcbx++;
		if(eval(obj).elements[i].type=="checkbox" && eval(obj).elements[i].checked==false) tckbxs++;
	}

	if(tcbx==tckbxs)
	{
		alert("Please Choose At Least one "+ homelot);
		return false;
	}
	else
	{
		if(confirm("Are you sure you would like to add these "+ homelot +"?")) return true;
		else 
		{
			for(var i=0;i<(eval(obj).elements.length);i++)
			{
				eval(obj).elements[i].checked=false;
			}
			return false;
		}
	}
}
function chkPropertyValues(frm,homelot)
{
	var obj;
	obj="document."+frm;
	
	fieldLength = eval(obj).fieldLength.value;
	
	for(i = 0; i < fieldLength; i++)
	{
		fieldvalue = eval(obj).txtPropertyValue[i].value;
		if(Trim(fieldvalue)=="")
		{
			alert("One/More Properties left blank. Please Specify");
			eval(obj).txtPropertyValue[i].focus();
			return false;
			
		}
	}

}

function getHTTPObject() {
  var xmlhttp;
  /*@cc_on
  @if (@_jscript_version >= 5)
    try {
      xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (E) {
        xmlhttp = false;
      }
    }
  @else
  xmlhttp = false;
  @end @*/
  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
    try {
      xmlhttp = new XMLHttpRequest();
    } catch (e) {
      xmlhttp = false;
    }
  }
  return xmlhttp;
}
var http = getHTTPObject(); // We create the HTTP Object


/**
 * This array is used to remember mark status of rows in browse mode
 */
var marked_row = new Array;


/**
 * Sets/unsets the pointer and marker in browse mode
 *
 * @param   object    the table row
 * @param   integer  the row number
 * @param   string    the action calling this script (over, out or click)
 * @param   string    the default background color
 * @param   string    the color to use for mouseover
 * @param   string    the color to use for marking a row
 *
 * @return  boolean  whether pointer is set or not
 */
function setPointer(theRow, theRowNum, theAction, theDefaultColor, thePointerColor, theMarkColor)
{
    var theCells = null;

    // 1. Pointer and mark feature are disabled or the browser can't get the
    //    row -> exits
    if ((thePointerColor == '' && theMarkColor == '')
        || typeof(theRow.style) == 'undefined') {
        return false;
    }

    // 2. Gets the current row and exits if the browser can't get it
    if (typeof(document.getElementsByTagName) != 'undefined') {
        theCells = theRow.getElementsByTagName('td');
    }
    else if (typeof(theRow.cells) != 'undefined') {
        theCells = theRow.cells;
    }
    else {
        return false;
    }

    // 3. Gets the current color...
    var rowCellsCnt  = theCells.length;
    var domDetect    = null;
    var currentColor = null;
    var newColor     = null;
    // 3.1 ... with DOM compatible browsers except Opera that does not return
    //         valid values with "getAttribute"
    if (typeof(window.opera) == 'undefined'
        && typeof(theCells[0].getAttribute) != 'undefined') {
        currentColor = theCells[0].getAttribute('bgcolor');
        domDetect    = true;
    }
    // 3.2 ... with other browsers
    else {
        currentColor = theCells[0].style.backgroundColor;
        domDetect    = false;
    } // end 3

    // 3.3 ... Opera changes colors set via HTML to rgb(r,g,b) format so fix it
    if (currentColor.indexOf("rgb") >= 0)
    {
        var rgbStr = currentColor.slice(currentColor.indexOf('(') + 1,
                                     currentColor.indexOf(')'));
        var rgbValues = rgbStr.split(",");
        currentColor = "#";
        var hexChars = "0123456789ABCDEF";
        for (var i = 0; i < 3; i++)
        {
            var v = rgbValues[i].valueOf();
            currentColor += hexChars.charAt(v/16) + hexChars.charAt(v%16);
        }
    }

    // 4. Defines the new color
    // 4.1 Current color is the default one
    if (currentColor == ''
        || currentColor.toLowerCase() == theDefaultColor.toLowerCase()) {
        if (theAction == 'over' && thePointerColor != '') {
            newColor              = thePointerColor;
        }
        else if (theAction == 'click' && theMarkColor != '') {
            newColor              = theMarkColor;
            marked_row[theRowNum] = true;
            // Garvin: deactivated onclick marking of the checkbox because it's also executed
            // when an action (like edit/delete) on a single item is performed. Then the checkbox
            // would get deactived, even though we need it activated. Maybe there is a way
            // to detect if the row was clicked, and not an item therein...
            // document.getElementById('id_rows_to_delete' + theRowNum).checked = true;
        }
    }
    // 4.1.2 Current color is the pointer one
    else if (currentColor.toLowerCase() == thePointerColor.toLowerCase()
             && (typeof(marked_row[theRowNum]) == 'undefined' || !marked_row[theRowNum])) {
        if (theAction == 'out') {
            newColor              = theDefaultColor;
        }
        else if (theAction == 'click' && theMarkColor != '') {
            newColor              = theMarkColor;
            marked_row[theRowNum] = true;
            // document.getElementById('id_rows_to_delete' + theRowNum).checked = true;
        }
    }
    // 4.1.3 Current color is the marker one
    else if (currentColor.toLowerCase() == theMarkColor.toLowerCase()) {
        if (theAction == 'click') {
            newColor              = (thePointerColor != '')
                                  ? thePointerColor
                                  : theDefaultColor;
            marked_row[theRowNum] = (typeof(marked_row[theRowNum]) == 'undefined' || !marked_row[theRowNum])
                                  ? true
                                  : null;
            // document.getElementById('id_rows_to_delete' + theRowNum).checked = false;
        }
    } // end 4

    // 5. Sets the new color...
    if (newColor) {
        var c = null;
        // 5.1 ... with DOM compatible browsers except Opera
        if (domDetect) {
            for (c = 0; c < rowCellsCnt; c++) {
                theCells[c].setAttribute('bgcolor', newColor, 0);
            } // end for
        }
        // 5.2 ... with other browsers
        else {
            for (c = 0; c < rowCellsCnt; c++) {
                theCells[c].style.backgroundColor = newColor;
            }
        }
    } // end 5

    return true;
} // end of the 'setPointer()' function

function get_element(id)
{
if (document.getElementById) 
myElementRef = document.getElementById(id);
else if (document.all) myElementRef = document.all[id]; 
else if (document.layers) myElementRef = document.layers[id];

return myElementRef;
}


function Html2Ascii(str) {
	var htmlCode = new Array('&aacute;','&acirc;','&acirc;;','&acute;','&aelig;','&agrave;','&amp;','&aring;','&atilde;','&auml;','&brvbar;','&ccedil;','&cedil;','&cent;','&copy;','&curren;','&deg;','&divide;','&eacute;','&ecirc;','&egrave;','&eth;','&euml;','&frac12;','&frac14;','&frac34;','&iacute;','&icirc;','&iexcl;','&igrave;','&iquest;','&iuml;','&laquo;','&ldquo;','&lsquo;','&macr;','&mdash;','&micro;','&middot;','&nbsp;','&ndash;','&not;','&ntilde;','&oacute;','&ocirc;','&ograve;','&ordf;','&ordm;','&oslash;','&otilde;','&ouml;','&para;','&plusmn;','&pound;','&quot;','&raquo;','&rdquo;','&reg;','&rsquo;','&sect;','&shy;','&sup1;','&sup2;','&sup3;','&szlig;','&thorn;','&times;','&uacute;','&ucirc;','&ugrave;','&uml;','&uuml;','&yacute;','&yen;');
	var charCode = new Array(225,226,226,180,230,224,38,229,227,228,124,231,184,162,169,63,176,247,233,234,232,60,235,49,49,51,237,238,161,236,191,239,171,32,32,175,32,181,183,160,32,172,241,243,244,242,170,186,248,245,246,182,177,163,34,187,32,174,32,167,45,49,50,51,223,60,42,250,251,249,168,252,121,165);
	var stripped = str.replace(/(<([^>]+)>)/ig,""); 
	stripped = stripped.replace(/\t/g," "); 
	stripped = stripped.replace(/(  )*/g,"");
	for(x=0;x<htmlCode.length;x++) {
		var reg = new RegExp(htmlCode[x], "ig");
		stripped = stripped.replace(reg,String.fromCharCode(charCode[x]));
	}
	return(stripped);
}

var curUrl="";
function addToSortlist(propId,url)
{
	curUrl=url;
	http.open("GET", DR_DOC_ROOT+"addinginmysortlist.php?propId=" + escape(propId), true);
	http.onreadystatechange = addToSortlistResponse;
	http.send(null);
}

function addToSortlistResponse()
{
  if (http.readyState == 4) {
	  if(http.responseText==1)
	  {
		alert("The listing has been added to your shortlist. Please click on the link 'my shortlist' to view your shortlist and evaluate or add comments about this listing.");
	  }
	  else if(http.responseText==0)
	  {
		alert("The listing is already in your shortlist.");
	  }
	  else
	  {
		location.replace(DR_DOC_ROOT+"login.php?u="+curUrl);
	  }
  }
}
function askToextendSession()
{
	document.getElementById("extendSessionBox").style.display="";
	//toggleDisabled(document.getElementById("main_Table"));
}
function keepConnectionAlive()
{
	document.getElementById("extendSessionBox").style.display="none";
	var http = getHTTPObject(); 
	http.open("GET", DR_DOC_ROOT+"keepConnectionAlive.php?time="+ new Date().getTime(), true);
	http.onreadystatechange = function() { };
	http.send(null);
	//toggleEnabled(document.getElementById("main_Table"));
}

function closeSession()
{
	location.replace(DR_DOC_ROOT+"logout.php");
	document.getElementById("extendSessionBox").style.display="none";
}

function toggleDisabled(el) {
	try {
		el.disabled = true;
	}
	catch(E){}

	if (el.childNodes && el.childNodes.length > 0) {
		for (var x = 0; x < el.childNodes.length; x++) {
		toggleDisabled(el.childNodes[x]);
		}
	}
}
function toggleEnabled(el) {
	try {
		el.disabled = false;
	}
	catch(E){}

	if (el.childNodes && el.childNodes.length > 0) {
		for (var x = 0; x < el.childNodes.length; x++) {
		toggleEnabled(el.childNodes[x]);
		}
	}
}
function changePageView(form, view)
{
	if(view=="normal")
	{
	form.pageview[0].checked=true;
	}
	else
	{
	form.pageview[1].checked=true;
	}
	form.submit();
}

function get_mouse_pointer_coordinates(e)
{
var posx = 0;
var posy = 0;
if (!e) var e = window.event;
if (e.pageX || e.pageY) {
posx = e.pageX;
posy = e.pageY;
}
else if (e.clientX || e.clientY) {
posx = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;
posy = e.clientY + document.body.scrollTop + document.documentElement.scrollTop;
}
//You have the coordinates in the posx and posY variables
//You can do whatever you want with them after this point
}

function myRound(num, numDecimalPlaces) {
	if (isNaN(num)) {
		return 0;
	}
	return num.toFixed(2);
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function validateEmail( strValue) {
var objRegExp  = /(^[a-zA-Z0-9]([a-zA-Z0-9&_\.\-]*)@([a-zA-Z0-9_\-\.\-]*)([.][a-z]{3})$)|(^[a-zA-Z0-9]([a-zA-Z0-9&_\.\-]*)@([a-zA-Z0-9_\-\.\-]*)(\.[a-z]{3})(\.[a-z]{2})*$)|(^[a-zA-Z0-9]([a-zA-Z0-9&_\.\-]*)@([a-zA-Z0-9_\-\.\-]*)(\.[a-z]{4})(\.[a-z]{3})*$)|(^[a-zA-Z0-9]([a-zA-Z0-9&_\.\-]*)@([a-zA-Z0-9_\-\.\-]*)(\.[a-z]{2})(\.[a-z]{2})*$)/i;
 
  //check for valid email
  return objRegExp.test(strValue);
}
function htmlentities (string, quote_style) {
    // http://kevin.vanzonneveld.net
    // +   original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +    revised by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +   improved by: nobbler
    // +    tweaked by: Jack
    // +   bugfixed by: Onno Marsman
    // +    revised by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +    bugfixed by: Brett Zamir (http://brett-zamir.me)
    // -    depends on: get_html_translation_table
    // *     example 1: htmlentities('Kevin & van Zonneveld');
    // *     returns 1: 'Kevin &amp; van Zonneveld'
    // *     example 2: htmlentities("foo'bar","ENT_QUOTES");
    // *     returns 2: 'foo&#039;bar'
 
    var histogram = {}, symbol = '', tmp_str = '', entity = '';
    tmp_str = string.toString();
    
    if (false === (histogram = this.get_html_translation_table('HTML_ENTITIES', quote_style))) {
        return false;
    }
    histogram["'"] = '&#039;';
    for (symbol in histogram) {
        entity = histogram[symbol];
        tmp_str = tmp_str.split(symbol).join(entity);
    }
    
    return tmp_str;
}
function get_html_translation_table(table, quote_style) {
    // Returns the internal translation table used by htmlspecialchars and htmlentities  
    // 
    // version: 906.401
    // discuss at: http://phpjs.org/functions/get_html_translation_table
    // +   original by: Philip Peterson
    // +    revised by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +   bugfixed by: noname
    // +   bugfixed by: Alex
    // +   bugfixed by: Marco
    // +   bugfixed by: madipta
    // +   improved by: KELAN
    // +   improved by: Brett Zamir (http://brett-zamir.me)
    // +    bugfixed by: Brett Zamir (http://brett-zamir.me)
    // %          note: It has been decided that we're not going to add global
    // %          note: dependencies to php.js. Meaning the constants are not
    // %          note: real constants, but strings instead. integers are also supported if someone
    // %          note: chooses to create the constants themselves.
    // *     example 1: get_html_translation_table('HTML_SPECIALCHARS');
    // *     returns 1: {'"': '&quot;', '&': '&amp;', '<': '&lt;', '>': '&gt;'}
    
    var entities = {}, histogram = {}, decimal = 0, symbol = '';
    var constMappingTable = {}, constMappingQuoteStyle = {};
    var useTable = {}, useQuoteStyle = {};
    
    // Translate arguments
    constMappingTable[0]      = 'HTML_SPECIALCHARS';
    constMappingTable[1]      = 'HTML_ENTITIES';
    constMappingQuoteStyle[0] = 'ENT_NOQUOTES';
    constMappingQuoteStyle[2] = 'ENT_COMPAT';
    constMappingQuoteStyle[3] = 'ENT_QUOTES';
    useTable       = !isNaN(table) ? constMappingTable[table] : table ? table.toUpperCase() : 'HTML_SPECIALCHARS';
    useQuoteStyle = !isNaN(quote_style) ? constMappingQuoteStyle[quote_style] : quote_style ? quote_style.toUpperCase() : 'ENT_COMPAT';
    if (useTable !== 'HTML_SPECIALCHARS' && useTable !== 'HTML_ENTITIES') {
        throw new Error("Table: "+useTable+' not supported');
        // return false;
    }
    if (useTable === 'HTML_ENTITIES') {
        entities['160'] = '&nbsp;';
        entities['161'] = '&iexcl;';
        entities['162'] = '&cent;';
        entities['163'] = '&pound;';
        entities['164'] = '&curren;';
        entities['165'] = '&yen;';
        entities['166'] = '&brvbar;';
        entities['167'] = '&sect;';
        entities['168'] = '&uml;';
        entities['169'] = '&copy;';
        entities['170'] = '&ordf;';
        entities['171'] = '&laquo;';
        entities['172'] = '&not;';
        entities['173'] = '&shy;';
        entities['174'] = '&reg;';
        entities['175'] = '&macr;';
        entities['176'] = '&deg;';
        entities['177'] = '&plusmn;';
        entities['178'] = '&sup2;';
        entities['179'] = '&sup3;';
        entities['180'] = '&acute;';
        entities['181'] = '&micro;';
        entities['182'] = '&para;';
        entities['183'] = '&middot;';
        entities['184'] = '&cedil;';
        entities['185'] = '&sup1;';
        entities['186'] = '&ordm;';
        entities['187'] = '&raquo;';
        entities['188'] = '&frac14;';
        entities['189'] = '&frac12;';
        entities['190'] = '&frac34;';
        entities['191'] = '&iquest;';
        entities['192'] = '&Agrave;';
        entities['193'] = '&Aacute;';
        entities['194'] = '&Acirc;';
        entities['195'] = '&Atilde;';
        entities['196'] = '&Auml;';
        entities['197'] = '&Aring;';
        entities['198'] = '&AElig;';
        entities['199'] = '&Ccedil;';
        entities['200'] = '&Egrave;';
        entities['201'] = '&Eacute;';
        entities['202'] = '&Ecirc;';
        entities['203'] = '&Euml;';
        entities['204'] = '&Igrave;';
        entities['205'] = '&Iacute;';
        entities['206'] = '&Icirc;';
        entities['207'] = '&Iuml;';
        entities['208'] = '&ETH;';
        entities['209'] = '&Ntilde;';
        entities['210'] = '&Ograve;';
        entities['211'] = '&Oacute;';
        entities['212'] = '&Ocirc;';
        entities['213'] = '&Otilde;';
        entities['214'] = '&Ouml;';
        entities['215'] = '&times;';
        entities['216'] = '&Oslash;';
        entities['217'] = '&Ugrave;';
        entities['218'] = '&Uacute;';
        entities['219'] = '&Ucirc;';
        entities['220'] = '&Uuml;';
        entities['221'] = '&Yacute;';
        entities['222'] = '&THORN;';
        entities['223'] = '&szlig;';
        entities['224'] = '&agrave;';
        entities['225'] = '&aacute;';
        entities['226'] = '&acirc;';
        entities['227'] = '&atilde;';
        entities['228'] = '&auml;';
        entities['229'] = '&aring;';
        entities['230'] = '&aelig;';
        entities['231'] = '&ccedil;';
        entities['232'] = '&egrave;';
        entities['233'] = '&eacute;';
        entities['234'] = '&ecirc;';
        entities['235'] = '&euml;';
        entities['236'] = '&igrave;';
        entities['237'] = '&iacute;';
        entities['238'] = '&icirc;';
        entities['239'] = '&iuml;';
        entities['240'] = '&eth;';
        entities['241'] = '&ntilde;';
        entities['242'] = '&ograve;';
        entities['243'] = '&oacute;';
        entities['244'] = '&ocirc;';
        entities['245'] = '&otilde;';
        entities['246'] = '&ouml;';
        entities['247'] = '&divide;';
        entities['248'] = '&oslash;';
        entities['249'] = '&ugrave;';
        entities['250'] = '&uacute;';
        entities['251'] = '&ucirc;';
        entities['252'] = '&uuml;';
        entities['253'] = '&yacute;';
        entities['254'] = '&thorn;';
        entities['255'] = '&yuml;';
    }
    if (useQuoteStyle !== 'ENT_NOQUOTES') {
        entities['34'] = '&quot;';
    }
    if (useQuoteStyle === 'ENT_QUOTES') {
        entities['39'] = '&#39;';
    }
    entities['60'] = '&lt;';
    entities['62'] = '&gt;';
    // ascii decimals for better compatibility
	
    //entities['38'] = '&amp;';
    // ascii decimals to real symbols
    for (decimal in entities) {
        symbol = String.fromCharCode(decimal);
        histogram[symbol] = entities[decimal];
    }
    
    return histogram;
}

function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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];}}
}

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_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

MM_preloadImages(DR_DOC_ROOT+"images/icon-video.gif",DR_DOC_ROOT+"images/norcurve_left_bot.gif",DR_DOC_ROOT+"images/norcurve_left_top.gif",DR_DOC_ROOT+"images/norcurve_right_bot.gif",DR_DOC_ROOT+"images/norcurve_right_top.gif",DR_DOC_ROOT+"images/curve_left_bot.gif",DR_DOC_ROOT+"images/curve_left_top.gif",DR_DOC_ROOT+"images/curve_right_bot.gif",DR_DOC_ROOT+"images/curve_right_top.gif");

function showTestimonials(pid)
{
	open(DR_DOC_ROOT+"show_id_testimonials.php?id="+pid,"testimonials","left="+((self.screen.width-700)/2)+",top="+((self.screen.height-430)/2)+",width=700,height=430,scrollbars=yes");
}