﻿var max=20;
var currentSize = 12;

function FontSize(increment)
{			
	currentSize = currentSize + (increment * 2);	
	if(currentSize < 10) currentSize = 10;	
	if(currentSize > 14) currentSize = 14;	
	   
	var p = document.getElementsByTagName('P');
	for(i=0;i<p.length;i++)
	{
	     var s = currentSize;
		 if(p[i].style.fontSize) 
		 {
		    var s = parseInt(p[i].style.fontSize.replace("px",""));
		    s = s + (increment * 2);	
		    if(s > currentSize || s < currentSize) s = currentSize;
		 } 				
	 	 p[i].style.fontSize = s+"px"
	}
}


function search()
{			
	var obj=document.getElementById('ctl00_SearchData');
	if (obj!=null)
	{
		//document.forms(0).action = "../Pages/SearchPage.aspx?q="+obj.value+"&site=PPH";
		//document.forms(0).submit(); 
		var myredirect= "../pages/searchpage.aspx?q=" + obj.value + "&site=allaboutpph" ;
		window.location =  myredirect; 
	}

}

	  	
	  	
	  
function JnJPrintContent()
{
	//Code added to open Print Preview in IE6 and IE7 Browsers.Does not work in FireFox.
	if(navigator.appName == "Microsoft Internet Explorer")
	{
		var OLECMDID = 7;
		/* OLECMDID values:
		* 6 - print
		* 7 - print preview
		* 1 - open window
		* 4 - Save As
		*/
		var PROMPT = 1; // 2 DONTPROMPTUSER 
		var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
		document.body.insertAdjacentHTML('beforeEnd', WebBrowser); 
		WebBrowser1.ExecWB(OLECMDID, PROMPT);
		WebBrowser1.outerHTML = "";
	}
	else
	{
	
		window.print();
	}
}
	

function OpenChild() 
{

//var MyArgs = window.showModalDialog("../../email/Pages/default.aspx","","left=300px,top=300px, width:502px, scrollbars=no, status =no, resizable=no,titlebar=no");
var myredirect=("../../email/Pages/default.aspx");

window.open(myredirect,'newpage','resizable=1,scrollable=1,height=700px,width=600px'); 
//window.showModalDialog(myredirect,null,'status:no;dialogWidth:510px;dialogHeight:750px;dialogHide:false;scroll:yes;center:yes;help:no');
//alert("hi");
}	


function search1()
{			
	var obj=document.getElementById('ctl00_SearchData');
	if (obj!=null)
	{
		//document.forms(0).action = "../../Pages/SearchPage.aspx?q="+obj.value+"&site=PPH";
		//document.forms(0).submit(); 
		//var myredirect=("../../Pages/SearchPage.aspx?q="+obj.value+"&site=PPH");

//window.open(myredirect); 
		var myredirect= "../../Pages/SearchPage.aspx?q=" + obj.value + "&site=allaboutpph" ;

window.location =  myredirect; 


	}

}

	function search2()
{			
	var obj=document.getElementById('ctl00_SearchData');
	if (obj!=null)
	{
		//document.forms(0).action = "../../../Pages/SearchPage.aspx?q="+obj.value+"&site=PPH";
		//document.forms(0).submit(); 
				//var myredirect=("../../../Pages/SearchPage.aspx?q="+obj.value+"&site=PPH");

//window.open(myredirect); 
		var myredirect= "../../../Pages/SearchPage.aspx?q=" + obj.value + "&site=allaboutpph" ;

window.location =  myredirect; 


	}

}
	




	