function PopupWindow(href, w, h, settings)
    {
        leftpos = (screen.width) ? (screen.width/2)-(w/2) : 0;
        toppos = (screen.height) ? (screen.height/2)-(h/2) : 0;
        settings = 'height='+h+',width='+w+',top='+toppos+',left='+leftpos+','+settings;
        popWin = window.open(href, 'popWin', settings);
        popWin.focus();
       
    }
    var myWidth = 0;
    function getSize() {
	  if( typeof( window.innerWidth ) == 'number' ) {
	    //Non-IE
	    myWidth = window.innerWidth;
	  } else if( document.documentElement &&
	      ( document.documentElement.clientWidth ) ) {
	    //IE 6+ in 'standards compliant mode'
	    myWidth = document.documentElement.clientWidth;
	  } else if( document.body && ( document.body.clientWidth ) ) {
	    //IE 4 compatible
	    myWidth = document.body.clientWidth;
	  }
	  
	}
	getSize();
	/*window.onresize=toggleAd;
	
	function toggleAd()
	{
		getSize();
		if(myWidth<=960)
		{
			document.getElementById('rightAd').style.display='none';
		}
		else
		{
			document.getElementById('rightAd').style.display='block';
		}
	}*/
	function openPopUp(url)
    {
        url = 'http://assets.bravenet.com/common/images/webtools/<?= $this->App->service; ?>/'+url
        screenshot = window.open(url,'service_screenshot','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=535,height=355');
        service_screenshot.document.title='service title';
    }