﻿
/* to toggle the image on hover*/

function imgSwap(obj, flag) {

    if (obj.src) {
        var newImg = '';
        if (flag)
            newImg = obj.src.replace("_off.", "_over.");
        else
            newImg = obj.src.replace("_over.", "_off.");

        obj.src = newImg;
    }
}


function StartPlayerByDivID(id) {
	var index = id.indexOf('_');
	var fileId = id.substring(0, (index == -1 ? id.length : index - 1));
	var so = new SWFObject('/v/' + fileId+'.aspx', 'mpl', '320', '240', '9');
	so.addParam('allowscriptaccess', 'always');
	so.addParam('allowfullscreen', 'true');
	so.addParam('wmode', 'transparent');
	so.write('div_flvVideoDiv' + id);
}

function StartPlayer(divId, videoId, width, height) {

	if (width == null)
		width = 320;
	if (height == null)
		height = 260;


	var so = new SWFObject('/v/' +videoId + '.aspx', 'mpl', width, height, '9');
	so.addParam('allowscriptaccess', 'always');
	so.addParam('allowfullscreen', 'true');
	so.addParam('wmode', 'transparent');
	so.write(divId);
}

function SelectInputContent(input) {
 input.focus();
 input.select();
}