﻿function SwitchDetailImage(newImage, newImageThickbox) {
	$('.detailImageSelf').attr({ src: newImage });
	$('.detailImageLink').attr({ href: newImageThickbox });
	//$('.detailImageLink').attr({ href: "javascript:void(0); ShowImagesWithActive('" + title + "', " + productID + ", " + activeIndex + ")" });
	return false;
}

function ShowImagesWithActive(title, productID, activeIndex) {
	//alert(title + '_' + productID + '_' + activeIndex);
	tb_show(title, '/Thickboxes/tb_ProductImages.aspx?A=' + productID + '&amp;I=' + activeIndex + '&amp;KeepThis=true&amp;TB_iframe=true&amp;width=590&amp;height=520', '');
}

function ShowImages(title, productID) {
	tb_show(title, '/Thickboxes/tb_ProductImages.aspx?A=' + productID + '&amp;KeepThis=true&amp;TB_iframe=true&amp;width=590&amp;height=520', '');
}

function ShowLogin(title) {
    tb_show(title, '/thickboxes/tb_Login.aspx?KeepThis=true&amp;TB_iframe=true&amp;height=200&amp;width=700', '');
}

function ShowOrderUserData(title) {
	tb_show(title, '/thickboxes/tb_OrderUserData.aspx?KeepThis=true&amp;TB_iframe=true&amp;height=160&amp;width=740', '');
}

function ShowOrderUserData(title) {
    tb_show(title, '/thickboxes/tb_OrderUserData.aspx?KeepThis=true&amp;TB_iframe=true&amp;height=160&amp;width=740', '');
}

function ShowChangePasswordData(title) {
    tb_show(title, '/Thickboxes/tb_ChangePassword.aspx?KeepThis=true&amp;TB_iframe=true&amp;height=155&amp;width=260', '');    
}

function EmbedVideo(container, flvFile, previewImage) {
    if (previewImage == '')
        previewImage = '/images/playmovie.jpg';

    var s1 = new SWFObject("/flash/nrc_player.swf", "productMovie", "475", "301", "9", "#FFFFFF");
    s1.addParam("wmode", "transparent");
    s1.addParam("allowfullscreen", "true");
    s1.addParam("allowscriptaccess", "always");
    s1.addParam("flashvars", "file=" + flvFile + "&image=" + previewImage + "&screencolor=#000000&skin=/flash/dark.swf");
    s1.write(document.getElementById(container));
}
function EmbedSmallVideo(container, flvFile, previewImage) {
    if (previewImage == '')
        previewImage = '/images/playmovie_small.jpg';

    var s1 = new SWFObject("/flash/nrc_player.swf", "productMovie", "336", "205", "9", "#FFFFFF");
    s1.addParam("wmode", "transparent");
    s1.addParam("allowfullscreen", "true");
    s1.addParam("allowscriptaccess", "always");
    s1.addParam("flashvars", "file=" + flvFile + "&image=" + previewImage + "&screencolor=#000000&skin=/flash/dark.swf");
    s1.write(document.getElementById(container));
}