//show/hide
function changeDisplay( elementId, setTo ) {
    if( document.getElementById ) {
			var theElement = document.getElementById( elementId );
			} else {
        if( document.all ) {
	        var theElement = document.all[ elementId ];
  	      } else {
          	var theElement = new Object();
        		}
    			}
    if( !theElement ) {
	    return;
  	  }
    if( theElement.style ) { theElement = theElement.style; }
    if( typeof( theElement.display ) == 'undefined' &&
    !( window.ScriptEngine && ScriptEngine().indexOf('InScript') + 1 ) ) {
      window.alert( 'Your browser does not support this' );
      return;
    	}
    theElement.display = setTo;
		}
//vport
var viewportheight = window.innerHeight + window.scrollMaxY;
if (viewportheight == 'undefined') {
	var viewportheight = document.documentElement.clientHeight + window.scrollMaxY;;
	}
if (viewportheight == 'undefined') {
	var viewportheight = document.getElementsByTagName('body')[0].clientHeight + window.scrollMaxY;;
	}

if( window.innerHeight && window.scrollMaxY ) {
	pageWidth = window.innerWidth + window.scrollMaxX;
	pageHeight = window.innerHeight + window.scrollMaxY;
	} else if( document.body.scrollHeight > document.body.offsetHeight ) {
		pageWidth = document.body.scrollWidth;
		pageHeight = document.body.scrollHeight;
		} else {
			pageWidth = document.body.offsetWidth + document.body.offsetLeft; pageHeight = document.body.offsetHeight + document.body.offsetTop; 
			}
			
var elementCreated;

function makeFrame() {
	 ifrm = document.createElement("IFRAME");
	 ifrm.setAttribute("src", "http://sfhonda.cms.dealer.com/");
	 ifrm.style.width = 800+"px";
	 ifrm.style.height = 500+"px";
	 ifrm.frameBorder = 0;
	 ifrm.setAttribute("scrolling", "auto");
	 ifrm.setAttribute("frameborder", "0");
	 document.getElementById('cPopInnerNest').appendChild(ifrm);
	 elementCreated = 1;
	} 
			
function hide() {
	changeDisplay('cPop','none');
	changeDisplay('cPopNest','none');
	}
	
function show() {
	changeDisplay('cPop','block');
	changeDisplay('cPopNest','block');
	if (elementCreated != 1) makeFrame();
	}
