/*function for Send to friend */
function ShareWithFriend()
{    
	 var winShare = window.open("/DesktopModules/EmailtoFriend/EmailToFriend.aspx", "winShare", "width=400,height=480,toolbar=no,directories=0,status=0,menubar=no,resizable=no,scrollbars=no");
}	
	

// Text Resizer function    		
// change font size of content area 

var theSize = parseInt(cgetCookie("fontsize"));
if (!(theSize>8)){
	theSize = 10;
}
function csetCookie(name, value, days){
  if (days) {
    var date = new Date();
    date.setTime(date.getTime()+(days*24*60*60*1000));
    var expires = "; expires="+date.toGMTString();
    }
  else var expires = "";
  document.cookie = name+"="+value+expires+"; path=/";
}
function cdeleteCookie(name){
	csetCookie(name, "", -1);
}

function cgetCookie(name) {
  var ca = document.cookie.split(';');
  var nameEQ = name + "=";
  for(var i=0; i < ca.length; i++) {
    var c = ca[i];
    while (c.charAt(0)==' ') c = c.substring(1, c.length); //delete spaces
    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
    }
  return null;
}

function ContentToResize(theContentToResize, theSize){
	if (theContentToResize != null)
		{
			theContentToResize.style.fontSize = theSize  + "px";						
		}	

}

function resizeText(optype){ 	

	if(document.getElementById("dnn_contentpane")){ 
			if (optype==1){
			if (theSize==14){
				theSize = 10;
			}else{
				theSize++;
				theSize++;
								
			}
		}
    
        var cntPInContentPane = document.getElementById("dnn_contentpane").getElementsByTagName("p");
        var cntPInRightpane = document.getElementById("dnn_rightpane").getElementsByTagName("p");
        
        //Increase font size of every <p> element in Content Pane
		for (var i=0; i<cntPInContentPane.length; i++)
		{	
			cntPInContentPane[i].className = "resizetext"+theSize;			
		}

        //Increase font size of every <p> element in Right Pane
		for (var j=0; j<cntPInRightpane.length; j++)
		{	
			cntPInRightpane[j].className = "resizetext"+theSize;			
		}
		cdeleteCookie("fontsize");
		csetCookie("fontsize",theSize,100); 
	} 
}
  /*---------------------------------------------------------------------------------------------------------------------------------------- */
		/*---------------------------------------------------------------------------------------------------------------------------------------- */
	 
