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_preloadImages() { //v3.0
	var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
	var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
	if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
	var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

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];}
}

$(document).ready(function(){
$('.tabs div').hide(); // Hide all divs
$('.tabs div:first').show(); // Show the first div
$('.tabs ul li:first').addClass('active'); // Set the class of the first link to active
$('.tabs ul li a').click(function(){ //When any link is clicked
$('.tabs ul li').removeClass('active'); // Remove active class from all links
$(this).parent().addClass('active'); //Set clicked link class to active
var currentTab = $(this).attr('href'); // Set variable currentTab to value of href attribute of clicked link
$('.tabs div').hide(); // Hide all divs
$(currentTab).show(); // Show div with id equal to variable currentTab
return false;
});
});

$(document).ready(function() {
    $('.tabs2 div').hide(); // Hide all divs
    $('.tabs2 div:first').show(); // Show the first div
    $('.tabs2 ul li:first').addClass('active'); // Set the class of the first link to active
    $('.tabs2 ul li a').click(function() { //When any link is clicked
        $('.tabs2 ul li').removeClass('active'); // Remove active class from all links
        $(this).parent().addClass('active'); //Set clicked link class to active
        var currentTab = $(this).attr('href'); // Set variable currentTab to value of href attribute of clicked link
        $('.tabs2 div').hide(); // Hide all divs
        $(currentTab).show(); // Show div with id equal to variable currentTab
        return false;
    });
});



$(document).ready(function() {
SetClasses()
});

function SetClasses() {
    $('input[type="text"], input[type="textArea"]').addClass("idleField");
    $('input[type="text"], input[type="textArea"]').focus(function() {
        $(this).removeClass("idleField").addClass("focusField");
        if (this.value == this.defaultValue) {
            this.value = '';
        }
        if (this.value != this.defaultValue) {
            this.select();
        }
    });
    $('input[type="text"], input[type="textArea"]').blur(function() {
        $(this).removeClass("focusField").addClass("idleField");
        if ($.trim(this.value) == '') {
            this.value = (this.defaultValue ? this.defaultValue : '');
        }
    });
}


var max_font_size = 17;
var min_font_size = 11;

$(function(){
	$('.controls-btns a').click(function(){
		var ourText = $('.enlarge-content, .enlarge-content td').not(".more a");
		var currFontSize = ourText.css('fontSize');
		var finalNum = parseFloat(currFontSize, 13);
		var stringEnding = currFontSize.slice(-2);
		if(this.id == 'large') {
			if(finalNum < max_font_size) finalNum += 2;
		}
		else if (this.id == 'small'){
			if(finalNum > min_font_size) finalNum -=2;
		}
		ourText.css('fontSize', finalNum + stringEnding);
	});
});

$(document).ready(function(){
$("#slideMail").hide();
$("a#mailBtn").click(function () {
  if ($("#slideMail").is(":hidden")) {
	$("#slideMail").slideDown("slow");
  } else {
	$("#slideMail").slideUp();
  }
});
$("#closeMail").click(function(){
	$("#slideMail").slideUp();							   
})
});

function CloseSendToFriend()
{$("#slideMail").slideUp();};

function print_function(title1)
{    
	var disp_setting="toolbar=no,location=no,directories=no,menubar=no,";
	disp_setting+="scrollbars=yes,width=799, height=400, left=100, top=100";
	var content_value = document.getElementById("printarea").innerHTML;
	var docprint=window.open("","",disp_setting);
	docprint.document.open();
	docprint.document.write('<html><head><title>Triple C</title>');
	docprint.document.write('<link rel="stylesheet" type="text/css" href="styles/triplec.css" /></head><body>');/* onLoad="javascript:self.print(); self.close();"*/
	docprint.document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td style="padding:10px;"><table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px solid #b9dbb6; padding:0 0 10px 0;"><tr><td><img src="images/logo.gif"></td><td align="center" width="60"><a href="javascript:;" onClick="javascript:print();">Print</a></td><td width="1">&nbsp;|&nbsp;<td align="center" width="50"><a href="javascript:;" onClick="window.close()">Close</a></td></tr></table></td></tr><tr><td><div style="padding-left:0px;"><object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="400" height="24"><param name="movie" value="swf/title.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="swfversion" value="9.0.45.0" /><!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. --><param name="expressinstall" value="Scripts/expressInstall.swf" /><param name="flashvars" value="title=' + title1 + '" /><!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. --><!--[if !IE]>--><object type="application/x-shockwave-flash" data="swf/title.swf" width="400" height="24"><!--<![endif]--><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="swfversion" value="9.0.45.0" /><param name="expressinstall" value="Scripts/expressInstall.swf" /><param name="flashvars" value="title=' + title1 + '" /><!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. --><div><h4>Content on this page requires a newer version of Adobe Flash Player.</h4><p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p></div><!--[if !IE]>--></object><!--<![endif]--></object></div></td></tr><tr><td style="padding:0 10px 10px 10px 10px;">'+content_value+'</td></tr></table>');
	docprint.document.write('</body></html>');
	docprint.document.close(); 
 	docprint.focus();
}
/*********************************************************************************/
function Loader() {
    MM_preloadImages('MenuImages/profile-on_9.gif', 'MenuImages/solutions-on_10.gif', 'MenuImages/partners-on_11.gif', 'MenuImages/news-on_12.gif', 'MenuImages/references-on_13.gif', 'MenuImages/customer-support-on_14.gif', 'images/our-new-on.gif', 'images/our-events-on.gif');
}
