// loadswf.js
function loadSWF(path, width, height, align, bgcolor, file, pathToFile, buffer)	{
	if (file == null)
	{
		var screenwidth = width;
		var screenheight = height;
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="' + screenwidth + '" height="' + screenheight + '">');
		document.write('<PARAM NAME=movie VALUE="' + path +  '">'); 
		document.write('<PARAM NAME=menu VALUE=false>');  
		document.write('<PARAM NAME=quality VALUE=high>');  
		document.write('<PARAM NAME=scale VALUE=noorder>');  
		document.write('<PARAM NAME=wmode VALUE=transparent>');  
		document.write('<PARAM NAME=bgcolor VALUE=' + bgcolor + '>'); 
		document.write('<embed wmode="transparent" src="' + path +  '" quality="high" bgcolor="' + bgcolor + '" width="' + screenwidth + '" height="' + screenheight + '" name="mymovie" align="' + align + '" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
		document.write('</object>');
	} else {
		var screenwidth = width + 12;
		var screenheight = height + 70;
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="' + screenwidth + '" height="' + screenheight + '" id="flashmovie">');
		document.write('<PARAM NAME=movie VALUE="' + path +  "?fileName=" + file + "&pathToFile=" + pathToFile + "&buffer=" + buffer +  '">'); 
		document.write('<PARAM NAME=menu VALUE=false>');  
		document.write('<PARAM NAME=quality VALUE=high>');  
		document.write('<PARAM NAME=scale VALUE=noorder >');  
		document.write('<PARAM NAME="wmode" VALUE="transparent">');  
		document.write('<PARAM NAME=bgcolor VALUE=' + bgcolor + '>'); 
		document.write('<embed wmode="transparent" name="flashmovie" src="' + path +  "?fileName=" + file + "&pathToFile=" + pathToFile + "&buffer=" + buffer + '" quality="high" bgcolor="' + bgcolor + '" width="' + screenwidth + '" height="' + screenheight + '" name="mymovie" align="' + align + '" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
		document.write('</object>');
	}
}

function getImageWidth(myImage) {
	var x, obj;
	if (document.layers) {
		var img = getImage(myImage);
		return img.width;
	} else {
		document.write(myImage);
		return getElementWidth(myImage);
	}
	return -1;
}

function getImageHeight(myImage) {
	var y, obj;
	if (document.layers) {
		var img = getImage(myImage);
		return img.height;
	} else {
		return getElementHeight(myImage);
	}
	return -1;
}

function getImgSize(imgSrc)
{
var newImg = new Image();
newImg.src = imgSrc;
var height = newImg.height;
var width = newImg.width;
//alert ('The image size is '+width+'*'+height);
}

function getWidth(ImageURL)	{
	var img = new Image();
	img.src = ImageURL;
	//alert ('The image Width is: '+img.width);
	return img.width;
	
}

function getHeight(ImageURL)	{
	var img = new Image();
	img.src = ImageURL;
	//alert ('The image height is: '+img.height);
	return img.height;
}
