
// highlight method
function highlightNavItem() {
	$("#" + active_nav_item + "").addClass('current');
	
	if(typeof(active_left_nav_item) != "undefined"){ 
		$("#" + active_left_nav_item + "").addClass('current');	
	}
}

/*if (document.images) {
names = new Array(  "zero" , "one"  );
        buttons = new Array(4);
for (m=0; m<=3; m++) {
buttons[m] = new Image(); }
        buttons[0].src = "images/logo_2.gif";
        buttons[1].src = "images/logo_2_o.gif"; }

function swap(des,num) {
if (document.images) {
document.images[names[des]].src = buttons[num].src;  }}
*/

function toggelone(id, photo){
	
  if(document.getElementById(id)){
	if(document.getElementById(id).style.display==''){
		document.getElementById(id).style.display='none';
		if(document.getElementById('img_'+id)) document.getElementById('img_'+id).src='images/share_calltoaction.jpg';	
	}else{	
		document.getElementById(id).style.display='';
		if(document.getElementById('img_'+id)) document.getElementById('img_'+id).src='images/share_calltoaction_.jpg';

		document.shareform.sendtoafirendphoto.value = photo;
	}
  }
}

function toggel(id,total){

	for (var x = 1; x <= total; x++){
		if(x == id){
		   if(document.getElementById('joy'+x)) document.getElementById('joy'+x).style.display='';
		}else{
		   if(document.getElementById('joy'+x)) document.getElementById('joy'+x).style.display='none';		

		}
	}

}





function expand_MenuOptions(id, totl){
   if(document.getElementById('submenu_'+id)) document.getElementById('submenu_'+id).style.display='';

   if(document.getElementById('minus_'+id)) document.getElementById('minus_'+id).style.display='';
   if(document.getElementById('plus_'+id)) document.getElementById('plus_'+id).style.display='none';
}





function expand_MenuOptions(id){
   if(document.getElementById('submenu_'+id)) document.getElementById('submenu_'+id).style.display='';

   if(document.getElementById('minus_'+id)) document.getElementById('minus_'+id).style.display='';
   if(document.getElementById('plus_'+id)) document.getElementById('plus_'+id).style.display='none';
}

function collapse_MenuOptions(id){
   if(document.getElementById('submenu_'+id)) document.getElementById('submenu_'+id).style.display='none';

   if(document.getElementById('minus_'+id)) document.getElementById('minus_'+id).style.display='none';
   if(document.getElementById('plus_'+id)) document.getElementById('plus_'+id).style.display='';
}


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








function createCookie(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 readCookie(name)
{
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++)
	{
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function eraseCookie(name)
{
	createCookie(name,"",-1);
}







function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=1,resizable=1,width=415,height=326,top = 153,left =55');");
}

function openPopup( pageToLoad, winName, width, height, center, scroll, winXpos, winYpos, resize) {

	xposition = 0;
	xposition = winXpos;
	yposition = 0;
	yposition = winYpos;
	resizable = 0;
	resizable = resize;
	if ((parseInt(navigator.appVersion) >= 4 ) && (center)) {
		xposition = (screen.width - width) / 2;
		yposition = (screen.height - height) / 2;
	}
	args = "width=" + width + ","     + "height=" + height + ","
	+ "location=0," + "menubar=0,"  + "resizable=" + resizable + "," + "scrollbars=" + scroll + ","
	+ "status=0,"   + "titlebar=0," + "toolbar=0," +                   "hotkeys=0,"
	+ "screenx=" + xposition + ","  //NN Only
	+ "screeny=" + yposition + ","  //NN Only
	+ "left=" + xposition + ","     //IE Only
	+ "top=" + yposition;           //IE Only

	return window.open( pageToLoad,winName,args );
}





/*
PositionX = 100;
PositionY = 100;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

defaultWidth  = 500;
defaultHeight = 500;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows

var AutoClose = false;

// Do not edit below this ...
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
function popImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
writeln('width=100-(document.body.clientWidth-document.images[0].width);');
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');writeln('if (isNN){');       
writeln('window.innerWidth=document.images["George"].width;');writeln('window.innerHeight=document.images["George"].height;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
writeln('<img name="George" src='+imageURL+' style="display:block"></body></html>');
close();		
}}
*/