// date LT
function date() {
var now = new Date();
var dayNames = new Array("Sekmadienis","Pirmadienis","Antradienis","Trečiadienis","Ketvirtadienis","Penktadienis","Šeštadienis");
var monNames = new Array("Sausis","Vasaris","Kovas","Balandis","Gegužė","Birželis","Liepa","Rugpjūtis","Rugsėjis","Spalis","Lapkritis","Gruodis");
document.write("" + dayNames[now.getDay()] + " " + monNames[now.getMonth()] + " " + now.getDate() + ", " + now.getFullYear());
}
// date Eng
function dateng() {
var now = new Date();
var dayNames = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
var monNames = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
document.write("" + dayNames[now.getDay()] + " " + monNames[now.getMonth()] + " " + now.getDate() + ", " + now.getFullYear());
}
// End of Date

// Photo random display function

function photo() {

photos= new Array()
//Set jpg sources, widths and heights
photos[0]=['img/Face/1.jpg', 300, 235 ]
photos[1]=['img/Face/2.jpg', 300, 235 ]
photos[2]=['img/Face/3.jpg', 300, 235 ]
photos[3]=['img/Face/4.jpg', 300, 235 ]
photos[4]=['img/Face/5.jpg', 300, 235 ]
photos[5]=['img/Face/6.jpg', 300, 235 ]
photos[6]=['img/Face/7.jpg', 300, 235 ]

////////////////No Need to Edit Below Here//////////////

//Randomizing Unit Courtesy of Mike Winter as seen at:
//http://www.dynamicdrive.com/forums/showthread.php?p=8442
function random(n) {
return Math.floor((Math.random() % 1) * n);
}

Array.prototype.shuffle = function() {var i = this.length;
while(i--) {this.swap(i, random(i + 1));}
};
Array.prototype.swap = function(x, y) {
var t = this[x]; this[x] = this[y]; this[y] = t;
};

photos.shuffle()
//End Randomizing Unit


document.write('\
<img src="'+photos[0][0]+'" height="'+photos[0][2]+'" width="'+photos[0][1]+'" align="right" alt="Dirbk ir keliauk! Darbo programos užsienyje" style="border: 1px solid #B4B051;"> \
')
}
// End of Photo ramdom display function

///////////////////////////////////////
// Yellow fade Effect /////////////////

// This is the amount of time (in milliseconds) that will lapse between each step in the fade
var FadeInterval = 600;

// This is where the fade will start
var StartFadeAt = 7;

// This is list of steps that will be used for the color to fade out
var FadeSteps = new Array();
	FadeSteps[1] = "ff";
	FadeSteps[2] = "ee";
	FadeSteps[3] = "dd";
	FadeSteps[4] = "cc";
	FadeSteps[5] = "bb";
	FadeSteps[6] = "aa";
	FadeSteps[7] = "99";

// These are the lines that "connect" the script to the page.
var W3CDOM = (document.createElement && document.getElementsByTagName);
addEvent(window, 'load', initFades);

// This function automatically connects the script to the page so that you do not need any inline script
// See http://www.scottandrew.com/weblog/articles/cbs-events for more information
function addEvent(obj, eventType,fn, useCapture)
{
	if (obj.addEventListener) {
		obj.addEventListener(eventType, fn, useCapture);
		return true;
	} else {
		if (obj.attachEvent) {
			var r = obj.attachEvent("on"+eventType, fn);
			return r;
		}
	}
}

// The function that initializes the fade and hooks the script into the page
function initFades()
{
	if (!W3CDOM) return;
    
// This section highlights targets from the URL (browser address bar)
    
    // Get the URL
    var currentURL = unescape(window.location);
    // If there is a '#' in the URL
    if (currentURL.indexOf('#')>-1) 
        // Highlight the target
        DoFade(StartFadeAt, currentURL.substring(currentURL.indexOf('#')+1,currentURL.length));
    

// This section searches the page body for anchors and adds onclick events so that their targets get highlighted
    
    // Get the list of all anchors in the body
    var anchors = document.body.getElementsByTagName('a');

    // For each of those anchors
    for (var i=0;i<anchors.length;i++)

        // If there is a '#' in the anchors href
        if (anchors[i].href.indexOf('#')>-1)

            // Add an onclick event that calls the highlight function for the target
            anchors[i].onclick = function(){Highlight(this.href);return true};
}

// This function is just a small wrapper to use for the oncick events of the anchors
function Highlight(target) {

	// Get the target ID from the string that was passed to the function
    var targetId = target.substring(target.indexOf('#')+1,target.length);
    DoFade(StartFadeAt, targetId);
}

// This is the recursive function call that actually performs the fade
function DoFade(colorId, targetId) {
    if (colorId >= 1) {
		document.getElementById(targetId).style.backgroundColor = "#ffff" + FadeSteps[colorId];
		
        // If it's the last color, set it to transparent
        if (colorId==1) {
            document.getElementById(targetId).style.backgroundColor = "transparent";
		}
        colorId--;
		
        // Wait a little bit and fade another shade
        setTimeout("DoFade("+colorId+",'"+targetId+"')", FadeInterval);
	}
}

// End of yellow fade Effect

// Flash Logo Display /////////////////////////

var flashinstalled = 0;
var flashversion = 0;
MSDetect = "false";
if (navigator.plugins && navigator.plugins.length)
{
	x = navigator.plugins["Shockwave Flash"];
	if (x)
	{
		flashinstalled = 2;
		if (x.description)
		{
			y = x.description;
			flashversion = y.charAt(y.indexOf('.')-1);
		}
	}
	else
		flashinstalled = 1;
	if (navigator.plugins["Shockwave Flash 2.0"])
	{
		flashinstalled = 2;
		flashversion = 2;
	}
}
else if (navigator.mimeTypes && navigator.mimeTypes.length)
{
	x = navigator.mimeTypes['application/x-shockwave-flash'];
	if (x && x.enabledPlugin)
		flashinstalled = 2;
	else
		flashinstalled = 1;
}
else
	MSDetect = "true";

function flash () {
if (flashinstalled == 2)
		document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='325' height='60'><param name='movie' value='http://www.ewc.lt/skin/logo_red.swf'><param name='quality' value='high'><embed src='http://www.ewc.lt/skin/logo_red.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='325' height='60'></embed></object>");
else if (flashinstalled == 1) document.write("<img src='skin/logo_red.gif' alt='East West Consulting :: Logotipas' width='325px' height='60px'>");
else document.write("<img src='skin/logo_red.gif' alt='East West Consulting :: Logotipas' width='325px' height='60px'>");

}
// End of Flash Logo Display //

// Christmass Greetings include
/*
function swfMain() {
document.write('\
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"\
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="300" height="235" align="right" class="flash">\
<param name="movie" value="http://www.ewc.lt/flsh/USA_300x235.swf">\
<param name="quality" value="high">\
<embed src="http://www.ewc.lt/flsh/USA_300x235.swf"\
quality="high"\
pluginspage="http://www.macromedia.com/go/getflashplayer"\
type="application/x-shockwave-flash"\
width="300"\
height="235"\
align="right"\
class="flash">\
</embed>\
</object>\
')
}
*/
// End of Christmass Greetings include

 
