


/* START: Show Shopping Cart Details             	*/
/***********************************************/
function showcartdetail(actiontype)
{
    var actiobtn = document.getElementById('btncartexp');
    var ihidconclp = document.getElementById('btnhidcartcollap');
    var ihidconexp = document.getElementById('btnhidcartexp');

    var x = findPosX(actiobtn);
    var y = findPosY(actiobtn);
    var ssicon = document.getElementById('sonystyleicon');


    var ob = document.getElementById('cartscrollpaneholder');
    var mysonylogo = document.getElementById('mysony_icon');

    var mysx = findPosX(mysonylogo);
    var xx = findPosX(ssicon);
    var yy = findPosY(ssicon);
    var width;
    var holderbottom;

    var rtl = false;

    if ( x < 500 ) rtl = true;
    if (typeof(ob) == 'object')
    {
        if (ob.style.visibility == 'visible')
        {
            ob.style.visibility = 'hidden';
            actiobtn.src = ihidconexp.src;
            actiobtn.alt = 'expand cart';
        }
        else
        {
            actiobtn.src = ihidconclp.src;
            actiobtn.alt = 'collapse cart';
            //check if cart has item
            //w = distance between 2 image + button width + gab between sonystyle to border

            if ( !rtl ) {
                width = x - xx + 17 + 13 + 5 + 6;
                ob = document.getElementById('cartscrollpaneholder');
                ob.style.visibility = 'visible';
                ob.style.position = 'absolute';
				ob.style.left	= 930 - width + 'px';

                ob.style.width = (width ) + 'px';
                ob.style.height = '217px';
                holderbottom = y + 15 + 14 + + 233 + 'px';
                //adjust bottom curve div
                var bmtl = document.getElementById('middleleft');
                var bmtr = document.getElementById('middleright');
                var bmt = document.getElementById('middlebottom');
                var divly = findPosX(bmtl);
                var divry = findPosX(bmtr);
                //end sdjust
                bmt.style.left = (divly + 5)  + 'px';
                bmt.style.width = (Math.abs(divry - divly - 5) - 10) + 'px';

                var con = document.getElementsByClassName('jScrollPaneContainer');
                con[0].style.width = (width - 20 - 5) + 'px';
                con[0].style.height = 150 + 'px';


                con = document.getElementsByClassName('itemimage');
                if ( con.length > 2 )
                {
                    con = document.getElementById('cartscrollpane');
                    con.style.margin = '5px 0px 0px 0px';
                    con.style.width = (width  -20 - 5 ) + 'px';
                }
                else
                {
                    con = document.getElementById('cartscrollpane');
                    con.style.margin = '10px 0px 0px 20px';
                    con.style.width = (width  -20 - 5 ) + 'px';

                }
               reInitScrollPane();

            }
            else
            {

                width = (xx - x + 17 + 71 + 12);
                ob = document.getElementById('cartscrollpaneholder');
                ob.style.visibility = 'visible';
                ob.style.position = 'absolute';

                ob.style.width = width + 'px';
                ob.style.height = '217px';
                holderbottom = y + 15 + 14 + + 233 + 'px';
                //adjust bottom curve div
                var bmtl = document.getElementById('middleleft');
                var bmtr = document.getElementById('middleright');
                var bmt  = document.getElementById('middlebottom');
                var divly = findPosX(bmtl);
                var divry = findPosX(bmtr);
                //end sdjust
                bmt.style.left = (divly + 5)  + 'px';
                bmt.style.width = (Math.abs(divry - divly - 5) - 10) + 'px';


                var con = document.getElementsByClassName('jScrollPaneContainer');
                 con[0].style.overflowy = 'scroll';
                 con[0].style.overflowx = 'hidden';
                con[0].style.width = (width  - 38) + 'px';
                con[0].style.height = 150 + 'px';

                /*var con = document.getElementById('cartscrollpane');
                con.style.width = (width + 6 -20 - 5 ) + 'px';*/


                con = document.getElementsByClassName('itemimage');
                if ( con.length > 2 )
                {
                    con = document.getElementById('cartscrollpane');
                    con.style.margin = '5px 0px 0px 0px';
                    con.style.width = (width  -20 - 5 ) + 'px';
                }
                else
                {
                    con = document.getElementById('cartscrollpane');
                    con.style.margin = '10px 20px 0px 0px';
                    con.style.width = (width  -20 - 5 ) + 'px';

                }
               reInitScrollPane();

            }
            ob = document.getElementsByClassName('itemimage');
            if ( !(typeof(ob) == 'object') && (ob.length > 0 ))
            {
                var con = document.getElementById('cartscrollpane');
                con.style.overflow = 'hidden';
            }

        }



    }
}
/* End: Show Shopping Cart Details             */
/***********************************************/

/***********************************************/
/* Start :Get Elements by ClassName            */
    document.getElementsByClassName=function()
    {
        var a = new Array();
        var e;
        var i = 0;
        while (e = document.getElementsByTagName ('*')[i++]){
            if(e.className == arguments[0]){
                a.push (e);
            };
        };
        return a;
    };
/* End :Get Elements by ClassName              */
/***********************************************/

/***********************************************/
/* Start :Find X coordinate of an object       */
 function findPosX(obj)
  {
    var curleft = 0;
    if(obj.offsetParent)
        while(1)
        {
          curleft += obj.offsetLeft;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.x)
        curleft += obj.x;
    return curleft;
  }
/* End :Find X coordinate of an object          */
/***********************************************/


/***********************************************/
/* Start :Find Y coordinate of an object       */
  function findPosY(obj)
  {
    var curtop = 0;
    if(obj.offsetParent)
        while(1)
        {
          curtop += obj.offsetTop;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.y)
        curtop += obj.y;
    return curtop;
  }
/* Start :Find Y coordinate of an object       */
/***********************************************/

/***********************************************/
/* Start :Initialise Cart Scroll Pane            */

jQuery(document).ready(function() {
    $jq('#cartscrollpane').jScrollPane({showArrows:true, scrollbarWidth: 20, arrowSize: 17,scrollbarOnLeft:true });
	$jq('#cartscrollpaneholder').bgiframe();
});


/* End :Initialise Cart Scroll Pane            */
/***********************************************/


/***********************************************/
/* Start :Initialise Cart Scroll Pane            */
function reInitScrollPane()
{
	$jq('#cartscrollpane').jScrollPane({showArrows:true, scrollbarWidth: 20, arrowSize: 17,scrollbarOnLeft:true });
	$jq('#cartscrollpaneholder').bgiframe();
}

function shoppingCartHackForAdjustFontSizeJS (){
	var temp;
	$jq('.adjusticonpanel').find('a').each(function(){
		var defaultfunctions;
		var updatedfunctions;
		defaultfunctions	= $jq(this).attr('onclick');

		if ($jq.browser.msie){
			defaultfunctions	= getFunctionContents (defaultfunctions);
			updatedfunctions	= "reInitScrollPane();" + defaultfunctions ;
			updatedfunctions	= new Function (updatedfunctions);
			this.onclick	= updatedfunctions;

			//$jq(this).attr("onclick", n);
			//this.onclick = new Function (updatedfunctions);
		}
		else{
			updatedfunctions	= "reInitScrollPane();"+ " " + defaultfunctions ;
			$jq(this).attr('onclick', updatedfunctions);
		}
	});
}

addLoadEvent (shoppingCartHackForAdjustFontSizeJS)
/* End :Initialise Cart Scroll Pane            */
/***********************************************/


/***********************************************/
/* Start :Show Login Widget                    */
function closelogin()
{
    var pn = document.getElementById('pop_loginblock');
    pn.style.visibility = 'hidden';

}
/* End :Show Login Widget           */
/***********************************************/


/***********************************************/
/* Start :e-commerce cart dropdown                    */
  function showlogin()
    {
        var pn = document.getElementById('pop_loginblock');
        var achr = document.getElementById('mysony');
        var x;
        var y;
        var windowwidth;
        x = findPosX(achr);
        y = findPosY(achr);
        windowwidth = document.body.offsetWidth;
        var ssicon = document.getElementById('sonystyleicon');
        xx  = findPosX(ssicon);

        if ( xx < 400 ) //right to left
        {

            if( navigator.appName=="Microsoft Internet Explorer" )
            {

            	//pn.style.left = (windowwidth - x + 15) + 'px' ;
            	//pn.style.left = (windowwidth - x - 17 -10 - 25 -333) + 'px' ;
            	//pn.style.visibility = 'visible';
            }
            else
            {
				//pn.style.left = (windowwidth - x - 17 -10 - 25 -333) + 'px' ;
            }
             pn.style.visibility = 'visible';
        }
        else
        {
            pn.style.visibility = 'visible';
            pn.style.position = 'absolute';
            //pn.style.left = (x + 55) + 'px';
        }



    }
    function findPosX(obj)
  {
    var curleft = 0;
    if(obj.offsetParent)
        while(1)
        {
          curleft += obj.offsetLeft;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.x)
        curleft += obj.x;
    return curleft;
  }

  function findPosY(obj)
  {
    var curtop = 0;
    if(obj.offsetParent)
        while(1)
        {
          curtop += obj.offsetTop;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.y)
        curtop += obj.y;
    return curtop;
  }

 /* End :e-commerce cart dropdown                */
/***********************************************/
/* End :Show Login Widget           */
/***********************************************/


/***********************************************/
/* Start :Ajax Replacement function                  */


function loadAjaxContent(url, targetElementID, optionalVar){
	$jq(targetElementID).load(url, {optionalVar:optionalVar});
}

/* End :Ajax Replacement function            */
/***********************************************/


/***********************************************/
/* Start :tab menu function                  */

function tabMenuItemCollection (tabID, tabGroupMembers, selectedClassName, unSelectedClassName){
	return {id:tabID, members:tabGroupMembers, selectedCSSClass:selectedClassName, unSelectedCSSClass:unSelectedClassName}

}


function toggleTabMenu (menuButtonInfo){
	var i;
	var total;
	var idInFocus;
	total = menuButtonInfo.members.length;

	for (i = 0; i < total; ++i){
		idInFocus	= menuButtonInfo.members [i];
		if( document.getElementById(idInFocus) != null ) {
			document.getElementById(idInFocus).className = (menuButtonInfo.id==idInFocus) ? menuButtonInfo.selectedCSSClass:menuButtonInfo.unSelectedCSSClass;
		}
	}
}
/* End :tab menu function          */
/***********************************************/




/***********************************************/
/* Start :Product Detail Select Image Index    */
function productdetail_selectImage(n,total)
{
    for (var i=1; i<=total; i++)
    {
        var obon = document.getElementById('pdimageon' + i);
        var oboff = document.getElementById('pdimageoff' + i);
        var obimg = document.getElementById('pdimage' + i);
        if ( i == n )
            obimg.src = obon.src;
        else
            obimg.src = oboff.src;
    }
}
/* End :Product Detail Select Image Index    */
/***********************************************/



/************************************************/
/* START: Show Product Availability Widget	*/
function closeproductavailability(){
	var pn = document.getElementById('pop_prodavailblock');
	pn.style.visibility = 'hidden';
}

function showproductavailability(){

	var pn = document.getElementById('pop_prodavailblock');
	var windowwidth = document.body.offsetWidth;
	var x = parseInt(windowwidth/2) - parseInt(pn.offsetWidth/2);

	pn.style.left = x + "px";
	pn.style.top = "350px";
	pn.style.visibility = 'visible';
}
/* END: Show Product Availability Widget	*/
/***********************************************/

/***********************************************/
/* Start :legacy button scripts for styled buttons                  */
function ecommerceButtonEndings() {
	if (!document.getElementsByTagName) {
		return false
	}

	var buttons = getElementsByClass("EcommerceButton");
	/* loop through all buttons and attach a child div */
	for (i=0; i < buttons.length; i++) {
		var div = document.createElement("div");
		div.className = "EcommerceButtonEnding";
		insertAfter(div, buttons[i]);
	}
}

addLoadEvent (ecommerceButtonEndings);



function doubleLineButtonEndings() {
	if (!document.getElementsByTagName) {
		return false
	}

	var buttons = getElementsByClass("DoubleLineButton");
	/* loop through all buttons and attach a child div */
	for (i=0; i < buttons.length; i++) {
		var div = document.createElement("div");
		div.className = "doubleButtonEnding";
		insertAfter(div, buttons[i]);
	}
}

addLoadEvent (doubleLineButtonEndings);

/* End :legacy button scripts for styled buttons          */
/***********************************************/

/***********************************************/
/* Start :new print function             */

function showPrintView (){
	var div = document.getElementById("TopStaticPrintHeader");
	div.style.display = 'inline';
	setActiveStyleSheet('print');
	/*
	* Mindtree July 22 2009- Mohit : fix for MySony left alignment of Right Navigation
	* This solution works fine with IE as well as firefox
	*/
	if(document.getElementsByClassName("mysony")!=null) {
		var mySonyDivObj = document.getElementsByClassName("mysony");
		if(mySonyDivObj[0]!=null){

			/* 
			* 50112: CSS issue- Print version of Order tracking page
			* 
			* Check for view parameter in the URL and apply the width
			* based on browser type. 
			*/
			var queryString = window.top.location.href;
			var parameterName = "view";
			var resultParam = getParameter(queryString, parameterName);
			if(resultParam == 'g_orderDetail') {

				if (navigator.appName == "Microsoft Internet Explorer")	{
					mySonyDivObj[0].style.width = "693px";
				}
				else if (navigator.appName == "Netscape") {
					mySonyDivObj[0].style.width = "710px";
				}
				else {
					 mySonyDivObj[0].style.width = "700px";
				}
			}
			else {
				mySonyDivObj[0].style.width = "700px";//"490px";
			}

	}
}
	/*
	* Mindtree July 23 2009- Mohit : fix Only for MySony Postlogin landing page left alignment of Right Navigation
	* This solution works fine with IE as well as firefox
	*/
	if(document.getElementById("mysony_postlogin")!=null) {
		var mySonyPostDivObj = document.getElementById("mysony_postlogin");
		if(mySonyPostDivObj!=null){
			mySonyPostDivObj.style.width = "700px";
		}
	}

	/*
	* Mindtree July 3 2009- Mohit : fix for displaying only selected tab
	* This solution works fine with IE as well as firefox
	*/
	$tabCount	= $jq(".pro_details_tabs > .tabs > .TabMenu ul li a");
	var i_tabId = $tabCount.length;
	for (i = 1 ; i <= i_tabId; i++){
		if(document.getElementById("eComTab"+i)!=null) {
			var tabId = document.getElementById("eComTab"+i);
			s_CSSClass = tabId.attributes.getNamedItem("class").nodeValue;
			if(s_CSSClass == ""){
				tabId.style.display = 'none';
			}
		}
	}
	window.setTimeout('printWindow()',100);
}

function showWebView (){
	var div = document.getElementById("TopStaticPrintHeader");
	div.style.display = 'none';
	setActiveStyleSheet('web');
	/*
	* Mindtree July 22 2009- Mohit : fix for MySony left alignment of Right Navigation
	* This solution works fine with IE as well as firefox
	*/
	if(document.getElementsByClassName("mysony")!=null) {
		var mySonyDivObj = document.getElementsByClassName("mysony");
		//mySonyDivObj[0].attributes.getNamedItem("style").nodeValue = "";
		if(mySonyDivObj[0]!=null){
			mySonyDivObj[0].style.width = "auto";
		}
	}
	/*
	* Mindtree July 23 2009- Mohit : fix Only for MySony Postlogin landing page left alignment of Right Navigation
	* This solution works fine with IE as well as firefox
	*/
	if(document.getElementById("mysony_postlogin")!=null) {
		var mySonyPostDivObj = document.getElementById("mysony_postlogin");
		if(mySonyPostDivObj!=null){
			mySonyPostDivObj.style.width = "912px";
		}
	}


	/*
	* Mindtree July 3 2009- Mohit : fix for displaying all tabs
	* This solution works fine with IE as well as firefox
	*/
	$tabCount	= $jq(".pro_details_tabs > .tabs > .TabMenu ul li a");
	var i_tabId = $tabCount.length;
	for (i = 1 ; i <= i_tabId; i++){
		if(document.getElementById("eComTab"+i)!=null) {
			var tabId = document.getElementById("eComTab"+i);
			s_CSSClass = tabId.attributes.getNamedItem("class").nodeValue;
			if(s_CSSClass == ""){
				tabId.style.display = 'block';
			}
		}
	}
}

/***********************************************/
/* Start :  return parameter value from the URL          
* 50112: CSS issue- Print version of Order tracking page */
function getParameter ( queryString, parameterName ) {
var parameterName = parameterName + "=";
if ( queryString.length > 0 ) {
	begin = queryString.indexOf ( parameterName );
	if ( begin != -1 ) {
		begin += parameterName.length;
		end = queryString.indexOf ( "&" , begin );
		if ( end == -1 ) {
			end = queryString.length
		}
		return unescape ( queryString.substring ( begin, end ) );
	}
return "null";
}
}

/***********************************************/
/* End :  return parameter value from the URL          */


/* End :new print function          */
/***********************************************/

/***********************************************/
/* Start :  rounded corner work around for elements loaded by ajax          */

function drawRoundedCornersForAjaxContent (domElement){
 	var i;
	var total;
	var collection;
	collection 	= find_class (domElement, "rounded");
	total		= collection.length;
	//rounded_corners($jq('.pro_details_tabs .rounded')[0]);
	for (i = 0 ; i <Number(total); ++i){
		rounded_corners(collection [i]);
	}
}
/* End :rounded corner work around for elements loaded by ajax          */
/***********************************************/


/***********************************************/
/* Start :  Minimise content script          */

function minimiseContent(content_div_id, title_div_id){
	var content_div = document.getElementById (content_div_id);
	var title_div 	= document.getElementById (title_div_id);

	if( content_div != null ){
		content_div.className = (content_div.className == 'content_wrapper' ? 'content_wrapper_hidden':'content_wrapper');
	}
	if( title_div != null ){
		title_div.className = (title_div.className == 'title_icon' ? 'title_icon_expand':'title_icon');
	}
}
/* End :Minimise content script          */
/***********************************************/


/***********************************************/
/* Start :  utility function to get function contents          */


//-- used in IE workarounds for getting function contents
function getFunctionContents (func){
	var str;
	if (func != null){
		str = func.toString();
		str = str.replace(/[^{]+{/,"");
		str = str.substring(0,str.length-1);
	}
	return str;
}

/* End :utility function to get function contents           */
/***********************************************/


/***********************************************/
/* Start :  support shortcut footer hack         */

function supportShortcutHackForAdjustFontSizeJS (){

	$jq('.adjusticonpanel').find('a').each(function(){
		var defaultfunctions;
		var updatedfunctions;
		defaultfunctions	= $jq(this).attr('onclick');

		if ($jq.browser.msie){
			defaultfunctions	= getFunctionContents (defaultfunctions);
			updatedfunctions	= "window.setTimeout ('calculateSupportShorcutHeight()', 200);" + defaultfunctions ;
			updatedfunctions	= new Function (updatedfunctions);
			this.onclick		= updatedfunctions;

		}
		else{
			updatedfunctions	= "window.setTimeout ('calculateSupportShorcutHeight()', 200);"+ " " + defaultfunctions ;
			$jq(this).attr('onclick', updatedfunctions);
		}
	});
}

function calculateSupportShorcutHeight(){
	var total;
	var i;
	var maxHeight;
	var domObj;
	total	= $jq('.shortcutcontent').length
	for (i = 0; i < total; ++i){
		domObj = $jq('.shortcutcontent')[i];
		$jq(domObj).css ('height', 'auto'	);
		if (maxHeight == null){
			maxHeight = $jq(domObj).height();
		}
		else{
			if ($jq(domObj).height() > maxHeight)
				maxHeight = $jq(domObj).height();
		}
	}
	$jq('.shortcutcontent').css ('height', maxHeight);
	if (!$jq.browser.msie){
		$jq('#suppshortcut').css ('height', maxHeight + 47);
		$jq('.shortcuttop').css ('height', maxHeight + 47);
		$jq('.shortcutbtm').css ('height', maxHeight + 47);
	}
	else{
		$jq('#suppshortcut').css ('height', maxHeight + 40);
		$jq('.shortcuttop').css ('height', maxHeight + 40);
		$jq('.shortcutbtm').css ('height', maxHeight + 40);
	}

}
function columnHeightHack()
{
	//var containerHeight = $jq("#threecolumn").height();
	//$jq("#threecolumn .column").css("height",containerHeight);
	$jq('.adjusticonpanel').find('a').each(function(){
		var updatedfunctions;
		defaultfunctions	= $jq(this).attr('onclick');

		if ($jq.browser.msie){
			defaultfunctions	= getFunctionContents (defaultfunctions);
			updatedfunctions	= "window.setTimeout ('calculateColumnHeight()', 200);" + defaultfunctions ;
			updatedfunctions	= new Function (updatedfunctions);
			this.onclick		= updatedfunctions;

		}
		else{
			updatedfunctions	= "window.setTimeout ('calculateColumnHeight()', 200);"+ " " + defaultfunctions ;
			$jq(this).attr('onclick', updatedfunctions);
		}
	});
}
function calculateColumnHeight()
{
	var total;
	var i;
	var maxHeight;
	var domObj;
	$jq('#threecolumn').css ('height', 'auto');
	//-- forgot to clear the inner collumns
	$jq('#threecolumn .seperator').css ('height', 'auto');
	total	= $jq('#threecolumn').length;
	maxHeight = 0;

	for (i = 0; i < total; ++i){
		domObj = $jq('#threecolumn')[i];
		$jq(domObj).css ('height', 'auto'	);

		if (maxHeight == null){
			maxHeight = $jq(domObj).height();
		}
		else{
			if ($jq(domObj).height() > maxHeight)
				maxHeight = $jq(domObj).height();
		}
	}
	$jq('#threecolumn').css ('height', maxHeight);
	if (!$jq.browser.msie){
		$jq('#threecolumn .seperator').css ('height', maxHeight);
		//$jq('.shortcutbtm').css ('height', maxHeight + 47);
	}
	else{
		$jq('#threecolumn .seperator').css ('height', maxHeight);
		//$jq('.shortcutbtm').css ('height', maxHeight + 41);
	}
}
addLoadEvent (calculateSupportShorcutHeight);
addLoadEvent (supportShortcutHackForAdjustFontSizeJS);

addLoadEvent (calculateColumnHeight);
addLoadEvent (columnHeightHack);

/* End :upport shortcut footer hack          */
/***********************************************/


/***********************************************/
/* Start :  page header width hack         */
/*
jQuery(document).ready(function() {
  if (document.getElementById('sectionh') && document.getElementById('procatimgname')) {
	  document.getElementById('sectionh').style.width= (document.getElementById('procatimgname').clientWidth>108?300:380) +"px";
	}
});
*/

$jq(document).ready(function () {
   $jq(".removed").click(function(e)
	 {
		 	e.preventDefault();
			$jq(this).next('div.removedialog').toggle();
	});
	$jq(".removedclose").click(function(e)
	  {
		  e.preventDefault();
		  $jq(this).parents('div.removedialog').toggle();
	  });
 });


$jq(document).ready(function () {
   $jq(".mysonylogin").click(function(e)
	 {
		 	e.preventDefault();
			$jq(this).next('div.mysonylogindialog').toggle();
	});
	$jq(".mysonyloginclose").click(function(e)
	  {
		  e.preventDefault();
		  $jq(this).parents('div.mysonylogindialog').toggle();
	  });
 });

 $jq(document).ready(function () {
   $jq(".clearorderwindow").click(function(e)
	 {
		 	e.preventDefault();
			$jq(this).next('div.clearorderdialog').toggle();
	});
	$jq(".clearorderclose").click(function(e)
	  {
		  e.preventDefault();
		  $jq(this).parents('div.clearorderdialog').toggle();
	  });
 });

$jq(document).ready(function () {
   $jq(".retryorder").click(function(e)
	 {
		 	e.preventDefault();
			$jq(this).next('div.retryorderdialog').toggle();
	});
	$jq(".retryorderclose").click(function(e)
	  {
		  e.preventDefault();
		  $jq(this).parents('div.retryorderdialog').toggle();
	  });
 });


/***********************************************/
/* Start :  Three Column Height Hack (Modified by Dinu - Simillar function Line 543 downards)     */

function calcColumnHeightForAdjustFontSizeJS (){

	$jq('.adjusticonpanel').find('a').each(function(){
		var defaultfunctions;
		var updatedfunctions;
		defaultfunctions	= $jq(this).attr('onclick');

		if ($jq.browser.msie){
			defaultfunctions	= getFunctionContents (defaultfunctions);
			updatedfunctions	= "window.setTimeout ('reCalcHeight()', 200);" + defaultfunctions ;
			updatedfunctions	= new Function (updatedfunctions);
			this.onclick		= updatedfunctions;

		}else{
			updatedfunctions	= "window.setTimeout ('reCalcHeight()', 200);"+ " " + defaultfunctions ;
			$jq(this).attr('onclick', updatedfunctions);
		}
	});
}

// Adjuster Function
function calcColumnHeight(el){
	var total;
	var i;
	var maxHeight = 0;
	var domObj;
	total	= $jq(el).length;
	for (i = 0; i < total; ++i){
		domObj = $jq(el)[i];
		$jq(domObj).css ('height', 'auto'	);
		if (maxHeight == null){
			maxHeight = $jq(domObj).height();
		}
		else{
			if ($jq(domObj).height() > maxHeight)
				maxHeight = $jq(domObj).height();
		}
	}
	$jq(el).css ('height', maxHeight);


}
