/*
  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Copyright © 2003 by Gary Johnson
Copyright (&copy;) 2003 by Gary Johnson

COPYRIGHT

The information contained on this site is protected by Canadian, United States of America and international copyright laws.

All website materials, including, without limitation, design, text, graphics, photos, files, the Fast Track! logo, and 
the selection and arrangement thereof are © 2004 Gary Johnson ALL RIGHTS RESERVED.
 
Permission is granted to electronically copy and print to hard copy portions of this website for the sole purpose of 
using materials it contains for informational and non-commercial personal use only.
 
Any other use of materials in this website, including any commercial use, reproduction for purposes other than those noted above, 
modification, distribution or republication, without the prior written consent of Gary Johnson is strictly prohibited.


The Full Copyright statement is

	http://mywebpages.comcast.net/adgj/XXSoftwareTools/Copyright.html

  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*/


//	Make sure ID is unique!
//	myClass.className = 'buttonH' + temp; does not work		getElement(myId).className = 'buttonH' + temp; does

//  Glitch if I have this on a button type element, I click on the button, do a script
//  the script executes
//  if I have the script make the button go away
//  Mozilla seems to still have an event for the button to execute.
//  when it excutes, than I throw an error with a try catch block
//
// removing the onblur event seems to make this okay.
//  I don't now wether to just trap an error or what.


/*

Changelog
*/
function toggleHighLight(myEvent, myId)
{
 
		try
		{
			var myClass = getElement(myId).className;

			var temp = myClass.substr(7, 10);

			if(myEvent == "m")
			{
				getElement(myId).className = 'buttonH' + temp;
			}
			else if(myEvent == "f")
			{
				getElement(myId).className = 'buttonF' + temp;
			}
			else if(myEvent == "o")
			{
				getElement(myId).className = 'buttonN' + temp;
			}
		}
		catch (error)
		{
			if(checkDebug())
			{
					gjonerror( error, " toggleHighLight ");
			}
		}
return false;
}



/*


A cookie set in a subdirectory will not overwrite a cookie set in its parent directory but will hide its value.

To override the path value of a cookie you must include 'path=PATH' in the cookie string. 
If you always want to have your cookies visible throughout the site you should hard code path=/ into the setCookie() function.
If cookies are set in different directories with the same name then the one with the longest (most specific) path 
will be returned

I need to do something with set and getcookie so that I can always get it
Maybe I need to set a temp cookie in every document with its path and then use that cookie to find the other cookie.


windows / cookies

abuserName
Gary
~~local~~/
1088
3619343616
29690079
1595152416
29616654
*


*/
function getCookieVal (offset) 
{
var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1)
		endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}

// name - name of the desired cookie
// * return string containing value of specified cookie or null if cookie does not exist
// call setCookie with a name and a value
// call getCookie for the name, returns the value

function getCookie(name) 
{

    try
    {
        var dc = document.cookie;
        var prefix = name + "=";
        var begin = dc.indexOf("; " + prefix);

        if (begin == -1)
        {
            begin = dc.indexOf(prefix);
            if (begin != 0)
            return null;
        }
    else
        begin += 2;

        var end = document.cookie.indexOf(";", begin);
        if (end == -1)
        end = dc.length;
    }
    catch (error)
    {
        gjonerror( error, " getCookie ");
        return 0;
    }

return unescape(dc.substring(begin + prefix.length, end));
}
/*
function getCookie( name ) {
	var start = document.cookie.indexOf( name + "=" );
	var len = start + name.length + 1;
	if ( ( !start ) && ( name != document.cookie.substring( 0, name.length ) ) ) {
		return null;
	}
	if ( start == -1 ) return null;
	var end = document.cookie.indexOf( ";", len );
	if ( end == -1 ) end = document.cookie.length;
	return unescape( document.cookie.substring( len, end ) );
}
*/


// name - name of the cookie
// value - value of the cookie
// [expires] - expiration date of the cookie (defaults to end of current session)
// [path] - path for which the cookie is valid (defaults to path of calling document)
// [domain] - domain for which the cookie is valid (defaults to domain of calling document)
// [secure] - Boolean value indicating if the cookie transmission requires a secure transmission
// * an argument defaults when it is assigned null as a placeholder
// * a null placeholder is not required for trailing omitted arguments
// following statement, for example, sets a new cookie with a minimum number of attributes:
//
// document.cookie = "cookieName=cookieValue";
//
// this version does not set the defualt date


// cookie expires in 24 hrs * 60 mins * 60 secs * 1000 milliseconds * 2000 days  

//	expdate.setTime(expdate.getTime() + (24 * 60 * 60 * 1000 * 2000)); 
	
//	setCookie("THEME", value, expdate, "/", null, false);

function setCookie(name, value, expires, path, domain, secure) 
{
	var curCookie = name + "=" + escape(value) +
		((expires) ? "; expires=" + expires.toGMTString() : "") +
		((path) ? "; path=" + path : "") +
		((domain) ? "; domain=" + domain : "") +
		((secure) ? "; secure" : "");
	document.cookie = curCookie;
}

/*
	
function setCookie( name, value, expires, path, domain, secure ) {
	var today = new Date();
	today.setTime( today.getTime() );
	if ( expires ) {
		expires = expires * 1000 * 60 * 60 * 24;
	}
	var expires_date = new Date( today.getTime() + (expires) );
	document.cookie = name+"="+escape( value ) +
		( ( expires ) ? ";expires="+expires_date.toGMTString() : "" ) + //expires.toGMTString()
		( ( path ) ? ";path=" + path : "" ) +
		( ( domain ) ? ";domain=" + domain : "" ) +
		( ( secure ) ? ";secure" : "" );
}

*/



// name - name of the cookie
// [path] - path of the cookie (must be same as path used to create cookie)
// [domain] - domain of the cookie (must be same as domain used to create cookie)
// * path and domain default if assigned null or omitted if no explicit argument proceeds

function deleteCookie(name, path, domain) 
{
	if (getCookie(name)) 
	{
		document.cookie = name + "=" + 
			((path) ? "; path=" + path : "") +
			((domain) ? "; domain=" + domain : "") +
			"; expires=Thu, 01-Jan-70 00:00:01 GMT";
	}
}

//I had a problem setting a cookie that is accessible from different
//parts of the path off of Cookbook in IE
//when I added the path and domain to the delete cookie, it started working correctly

function setDebug(which)
{
var expdate = new Date();

		//expiration one year from today
		expdate.setTime(expdate.getTime() + (24 * 60 * 60 * 1000 * 365)); 

		if(which == 1)
		{
			alert("setDebug on");
			setCookie("DebugCB", which, expdate, "/", null, false);
		}
		else
		{
			alert("setDebug off");
			deleteCookie("DebugCB", "/", null);
		}
}
//check and display results of checkdebug
function checkDebugD()
{
    try
    {
        if( checkDebug())
        {
            alert('debugging on');
        }
    else
        {
            alert('debugging off');
        }
    }
    catch (error)
    {
        gjonerror( error, " checkDebugD ");
        return false;
    }
    
}

function checkDebug()
{

	var debugCB;

	try
	{
		debugCD = getCookie("DebugCB");

//		alert("in checkDebug value of debugCD is " + debugCD);

		if( debugCD == undefined  || debugCD == "" || debugCD == "0")
		{
			return false;
		}
		else
			{
				return true;
			}
		}
		catch (err)
		{
			gjonerror( err, " checkDebug ");
			//return false;
		}

	}




//used in gjmove so moved here

function testInteger(number)
{
//positive numbers
//  x - 0 to force conversion of text to number internally in place of a decent atoi, atof function
//  if passed internally, it can be a number
//  so I will be REALLY lazy and convert it to a string here, for this test
	number = number.toString();

	try
	{
		for (var i = 0; i < number.length; i++) 
		{
			var oneChar = number.charAt(i);
			if(oneChar >= "0" && oneChar <= "9") 
			{
				continue;
			}
			else
			{
				return false;
			}
		}
	}
	catch (error)
	{
		gjonerror( error, " testInteger ");
	}

return true;
}
  

function fixFileUrl(u) 
{
	//	var loc,fileloc; 
	//	loc = document.location.href; 
	//	if (loc.length > 9 && loc.substr(0,8)=='file:') 

// JavaScript strict warning:
// gjcore.js line 507: variable u hides argument
var windows
var u; 
	windows = (navigator.platform.indexOf('Win') != -1);
	/* chop off file: slash slash slash, unescape each %hh, convert back slash to forward slash and | to : */  
	u = u.substr(windows ? 8 : 7); 
	u = unescape(u); 
	if(windows) 
	{ 
		u = u.replace(/\//g,'\\'); 
		u = u.replace(/\|/g,':'); 
	} 
return u; 
} 

function checkQuote(instr)
{
    //   var re1 = /[\"\']/; regular expressions has side effects in FireFox 1.03
    //

    
    if(instr.length == 0)
       return false;
     
    
    try
    {

        if(instr.indexOf("'") != -1)
        {
            return false;
        }
    else
        if(instr.indexOf('"') != -1)
        {
            return false;
        }
    }
    catch (error)
    {
        gjonerror( error, " checkQuote ");
    }

return true;
}

function checkValidFileName(instr)
{
/*   
All code points between (00)(00) and (00)(1F), inclusive. (Control Characters)

# (00)(2A) '*'(Asterisk)
# (00)(2F) '/' (Forward Slash)
# (00)(3A) ':' (Colon)
# (00)(3B) ';' (Semicolon)
# (00)(3F) '?' (Question Mark)
# (00)(5C) '\' (Backslash)

added

  | 7c
  , 2c
  < 3e
  > 3c

* / : ; ? \ | < > , 

I could use a regular expression like the word.replace in 
C:\CBSOURCE\gj53run\jar\content\gj53run\gj53runOverlay.js    gj53runGetSelectedWord


*/      
    if(instr.length == 0)
       return false;
    
    try
    {
        if(instr.indexOf("*") != -1)
        {
            return false;
        }
				else
        if(instr.indexOf("/") != -1)
        {
            return false;
        }
				else
        if(instr.indexOf(":") != -1)
        {
            return false;
        }
				else
        if(instr.indexOf(";") != -1)
        {
            return false;
        }
				else
        if(instr.indexOf("?") != -1)
        {
            return false;
        }
				else
        if(instr.indexOf("\\") != -1)
        {
            return false;
        }
				else
        if(instr.indexOf("|") != -1)
        {
            return false;
        }
				else
        if(instr.indexOf(",") != -1)
        {
            return false;
        }
				else
        if(instr.indexOf("<") != -1)
        {
            return false;
        }
				else
        if(instr.indexOf(">") != -1)
        {
            return false;
        }
     }
    catch (error)
    {
        gjonerror( error, " checkValidFileName ");
    }

return true;
}

// I need to support UNC paths at some point
function checkValidPath(strin)
{
    try
    {
    
    	var strPath = new String(Trim(strin));
    	strPath = strPath.toUpperCase();
    	var re = ":";
    	var check1 = strPath.indexOf(re);
    
    	if(check1 > 0)
    	{
    		var strDrive = strPath.substring(0, check1);
    		if(strDrive.length != 1)
    		{
    			alert('we do not support UNC paths at this point, Please enter a valid path like C:\\CookBook input=' + strDrive  );
    			return false;
    		}
    
    		re = /^[A-Z ]*$/
    
    		if(!(re.test(strDrive)))
    		{
    			alert('not A - Z');
    			return false;
    		}

    		var re = "\\";
    		var check2 = strPath.indexOf(re);
				var check3 = (check1 > check2 ? check1 : check2);

    		var fileNM = 	strPath.substring((check3 + 1), strPath.length);

				myArray = fileNM.split(/\\/)

				if(myArray.length == 0)
				{
    			if(!(checkValidFileName(fileNM)))
    			{
    					alert(' * / : ; ? \ | < >  and control characters are invalid in file names ->' + fileNM);
    					return false;
    			}
					else
					{
							return true;
					}
				}
				else
				{
						for(i=0; i < myArray.length; i++)
						{
						
								if(!(checkValidFileName(myArray[i])))
   							{
    								alert('-> * / : ; ? \ | < >  and control characters are invalid in file names ->' + myArray[i] );
    								return false;
    						}
						}
							return true;

    		}
			}
			else
   		if(!(checkValidFileName(strin)))
    	{
    			alert(' * / : ; ? \ | < >  and control characters are invalid in file names -> ' +strin);
    			return false;
    	}
    }
    catch(e)
    {
    	gjonerror(e + " checkValidPath input = " + strin);
    }
return true;
}

function checkWild(instr)
{
    //   var re1 = /[\"\']/; regular expressions has side effects in FireFox 1.03
    //
    
    if(instr.length == 0)
       return false;
          
    try
    {

        if(instr.indexOf("%") >= 0)
        {
            return true;
        }
    }
    catch (error)
    {
        gjonerror( error, " checkWild ");
    }

return false;
}


/* 

  I use pixels in these functions, yet I define the orginal top left in PTs
  <div id="TSSinfo" style="visibility:hidden; position:absolute; width:auto; height:auto; top:100pt; left:250pt; background-color:lightseagreen; border-left: 5px solid #000; padding-right:15pt; z-index:1">

  changing IE to go from left to right, since I cannot draw on top of 
  java applet

*/
function displayTSS(event)
{
	try
	{

		setToggleTop(event);
		if(isGecko()) 
		{
			self.statusbar.visible=false;
		}
		StartTSS();
	}
	catch (error)
	{
		gjonerror( error, " displayTSS ");
	}
}

function StartTSS()
{
var mytop;
var myleft;
	try
	{
		if(isGecko())
		{
			mytop =	parseInt(getElement("TSSinfo").style.top);
		}
		else if(isIE())
		{
			myleft = getElement("TSSinfo").style.posLeft;
		}
		else
		{
			alert('unkown browser')
			return;
		}

		if(isGecko())
		{
			if(mytop >= getToggleTop())
			{
				toggleId = window.setInterval("TSSUp()",1);
			}
			else
			{
				getElement("TSSinfo").style.visibility = "visible";
				toggleId = window.setInterval("TSSDown()",1);
			}
		}
		else if(isIE())
		{
			if(myleft >= getToggleTop())
			{
				toggleId = window.setInterval("TSSUp()",1);
			}
			else
			{
				getElement("TSSinfo").style.visibility = "visible";
				toggleId = window.setInterval("TSSDown()",1);
			}
		}
	}
	catch (error)
	{
		gjonerror( error, " StartTSS ");
	}
}

function TSSDown()
{
var top;
var left;	
	try
	{
		if(isGecko()) 
		{
			top = parseInt(getElement("TSSinfo").style.top);
			top +=25;
			var sztop = top + "px";
			getElement("TSSinfo").style.top = sztop;
			if (top >= getToggleTop()) 
			{
				window.clearInterval(toggleId);
			}
		}
		else if(isIE())
		{
			left = getElement("TSSinfo").style.posLeft;
			
			left +=7;
			
			getElement("TSSinfo").style.posLeft = left;
			
			if (left >= getToggleTop()) 
			{
				window.clearInterval(toggleId);
			}
		}
		else
		{
			alert('unkown browser');
		}
	}
	catch (error)
	{
		gjonerror( error, " TSSDown ");
		//		alert('e.msg ' + e.message + '\n e.name ' + e.name + '\n e.desc ' + e.description + '\n e.line ' + e.line);	
	}
}

function TSSUp()
{
var top;
var left; 
	try
	{
		if(isGecko()) 
		{
			top = parseInt(getElement("TSSinfo").style.top);
			top -=25;
			var sztop = top + "px";
			getElement("TSSinfo").style.top = sztop;
			if (top <= getToggleBottom()) 
			{
				getElement("TSSinfo").style.visibility = "hidden";
				window.clearInterval(toggleId);
			}
			
		}
		else
		{
			left = getElement("TSSinfo").style.posLeft;
			
			left -=7;
			
			getElement("TSSinfo").style.posLeft = left;
			
			if(left <= getToggleBottom()) 
			{
				getElement("TSSinfo").style.visibility = "hidden";
				window.clearInterval(toggleId);
			}
		}
	}
	catch (error)
	{
		gjonerror( error, " TSSUp ");
	}
}

function getToggleTop()
{

	return vtoggleTop;

}



function cbPrint()
{

		var theDivs = document.getElementsByTagName('DIV');

		for(var i=0 ; i < theDivs.length; i++)
		{

			var aDiv = theDivs[i];

			var temp = aDiv.id;


		// make the hidden divs visisble 	
			var check1 = temp.substr(0,1);

			if(check1 == 'h')
			{
				if(aDiv.style.display == 'none')
				{
					aDiv.style.display = 'block';
				}
			}

//		dumpIt(aDiv ,"Divs");


		//lets hide the links - that are in the divs with class = MyButon
				if(aDiv.className == "MyButton" )
				{
					aDiv.style.display = 'none';
				}

		} //for

		// make the buttons go away
		var theInputs = document.getElementsByTagName('INPUT');

		for(var i=0 ; i < theInputs.length; i++)
		{
				var aInputs = theInputs[i];
				aInputs.style.display = 'none';
		}

		// make the regular links go away
		var theAs = document.getElementsByTagName('A');

		for(var i=0 ; i < theAs.length; i++)
		{
				var aAs = theAs[i];
				aAs.style.display = 'none';
		}
	
return true;	
}




/*
	parent.document.getElementById(id)

when running locally Mozilla returns currnet time as last modified
IE returns it fine
*/
function DisplayModifedDate(what,id)
{
	toggleHighLight(what, id);   
	
	if(what == 'o')
	{
		getElement(id).value="Show Date Last Modified";
	}
	else
	{
		var lastmod = parent.document.lastModified; // string of last modified date
		var lastmoddate = Date.parse(lastmod);   // date
		var DisplayDate;
		
		if(lastmoddate == 0)
		{               
			DisplayDate = "Last modified: Unknown";
		} 
		else
		{
			DisplayDate = "Last modified: " + lastmod;
		}
	
		getElement(id).value = DisplayDate;
	}
}


function getTimeStamp()
{
	var now		= new Date();

	var hour	= now.getHours();
	var min		= now.getMinutes();
	var sec		= now.getSeconds();

	if (min <= 9) 
	{
		min = "0" + min;
	}

	if (sec <= 9) 
	{
		sec = "0" + sec;
	}

	if (hour > 12) 
	{
		hour = hour - 12;
		ampm = "PM";
	}
	else 
	{
		hour = hour;
		ampm = "AM";
	}
	
	if (hour == 12) 
	{
		ampm = "PM";
	}

	if (hour == 00) 
	{
		hour = "12";
	}
	
	if(hour <= 9)
	{
		hour =  "0" + hour 
	}

	var msg1 = hour;
	msg1 += ':' + min;
	msg1 += ':' + sec + "." + now.getMilliseconds();
	msg1 += ' ' + ampm + ' ';

	msg1 = " " + msg1 + " ";
	    
return msg1;
}


//	not working in mozilla
//  what does this work for. it does not seem to work for a piece of style
//  maybe its for an HTML attribute like the src of a img
function changeAttribute(elementId, attrName, newData)
{
	try
	{
//		if(isGecko())
//		{
//			netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserWrite");
//		}

		if (document.getElementById)
		{
			var el = document.getElementById(elementId);
			el.setAttribute(attrName, newData);
		}
	}
 	catch (error)
	{
		gjonerror( error, " changeAttribute ");
	}
}


function getCBdir()
{
/* 
	get the default path to the content set at install time
*/

	try 
	{
	    netscape.security.PrivilegeManager.enablePrivilege("UniversalPreferencesRead");   
 	    var fp = navigator.preference("gj53run.URL1");
	    //alert("Permission to read preferences is granted. Your home page is "+fp);
	} 
	catch(err) 
	{
	    alert("Permission to read preferences was denied.");
	}

//return "file:///" + fp;
return fp;

}

function getCBPath(which, filein, etc)
{
/*

At install time gj53run.default.URL1 set in the preferences

example

		gj53run.default.URL1=C:\\CookBook\\

		getCBPath("charts", "TemperatureEquivalents.html", "not used")

*/

    var DEFAULTURL1 =  "file:///" + getCBdir();         
 
/*

    which 

		root 			only  DEFAULTURL1;

		tools 		\\XXSoftwareTools\\
		dict			\\TermsDictionaryGlossary\\
		hints			\\FoodFactsHintsTips\\

		bev				\\Beverages\\
		safe			\\FoodSafety\\
		herb			\\HerbsSpicesSeasonings\\
		equip			\\KitchenEquipment\\
		pantry		\\pantry\\
		pics			\\Pictures\\
		charts		\\ToolsChartsTables\\



*/

		if(which == "root")
		{
	    var DEFAULTSUBDIR1 =  	      "";
		}
		else if(which == "tools")
		{
  	  var DEFAULTSUBDIR1 =         "\\XXSoftwareTools\\";
		}
		else if(which == "dict")
		{
    	var DEFAULTSUBDIR1 =         "\\TermsDictionaryGlossary\\";
		}
		else if(which == "hints")
		{
    	var DEFAULTSUBDIR1 =         "\\FoodFactsHintsTips\\";
		}
		else if(which == "bev")
		{
    	var DEFAULTSUBDIR1 =         "\\Beverages\\";
		}
		else if(which == "safe")
		{
    	var DEFAULTSUBDIR1 =         "\\FoodSafety\\";
		}
		else if(which == "herb")
		{
    	var DEFAULTSUBDIR1 =         "\\HerbsSpicesSeasonings\\";
		}
		else if(which == "equip")
		{
    	var DEFAULTSUBDIR1 =         "\\KitchenEquipment\\";
		}
		else if(which == "pantry")
		{
    	var DEFAULTSUBDIR1 =         "\\pantry\\";
		}
		else if(which == "pics")
		{
    	var DEFAULTSUBDIR1 =         "\\Pictures\\";
		}
		else if(which == "charts")
		{
    	var DEFAULTSUBDIR1 =         "\\ToolsChartsTables\\";
		}
		else
		{
	    var DEFAULTSUBDIR1 =  	      "";
		}
    var myurl = DEFAULTURL1 + DEFAULTSUBDIR1 + filein;

return myurl;
}

function computeMillisec(aDate)
{
	var tstring = aDate.toUTCString();
//	alert(tstring);
	var nowMilliseconds = Date.parse(tstring ) + (aDate.getTimezoneOffset() * (60*1000));

return nowMilliseconds;
}

function getFFpref(which)
{
/* 
	generic for any pref note we have bools, strings 
*/

	try 
	{
	    netscape.security.PrivilegeManager.enablePrivilege("UniversalPreferencesRead");   
 	    var fp = navigator.preference(which);
	} 
	catch(err) 
	{
	    alert("Permission to read preferences was denied.");
			return "Error in  getFFpref";
	}

return fp;
}

	
// IE currentStyle is the inherited cascaded style
// MOZ getComputedStyle will give you values that are computed.

//
// - curentStyle will return auto or null for width, height, left, top 
// getComputedStyle returns the computed value

// Mozilla see C:\mozilla\content\html\style\src\nsComputedDOMStyle.cpp
// nsComputedDOMStyle::GetPadding(nsIFrame *aFrame,
// it does not do some of the high level ones
// return null per spec.

//  No GetBorderStyle

// yes GetBorderTopStyle
// see DOM inspector for additional interfaces to make this happen
// will kludge it up for now 
// C:\mozilla\extensions\inspector\resources\content\Flasher.js



//this never returned?
//		var test = mystyle.getPropertyCSSValue(cstyle);


//  	var theElem = document.getElementById(idin);

//  	var theVal = document.defaultView.getComputedStyle(theElem, null).getPropertyValue(cstyle);

//		alert('theVal ' + theVal); 


//function Test9()
//{
//	var testcs = getCompStyle('theheader','height');
//	alert('getCompStyle for' + idin + '-> ' + cstyle + '= ' + testcs);  
//return 'Return From Test9';
//}


// IE and Mozilla use CSS intercapitalization system (margin-left is marginLeft).
 	
 

function getCompStyle(idin, cstyle) //name collision with Mozilla getComputedStyle
{

	var myE = getElement(idin);
	
	if(isGecko())
	{

		if(document.defaultView)
		{
			if(cstyle == '') 
			{
				cstyle = null;
			}
			
			var mystyle = document.defaultView.getComputedStyle(myE,'');
			return mystyle.getPropertyValue(cstyle);
		}
		else
		{
			if(checkDebug())
			{
				alert('getCompStyle document.defaultView does not exist');
			}
			return false;  
		}
	}
	else if(isIE())
	{
		var ieCstyle	= getInterCap(cstyle);  //still needs work . try [] 
		var ieValue		= myE.currentStyle + '.' + ieCstyle;
		return ieValue;
	}
	else if(checkDebug())
	{
		alert('getCompStyle not done for this browser');
		return false;
	}
}


