<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="Advanced International TRUVEO Search"
title_url="http://vaish.rajan.googlepages.com/truveo"
description="Search your favorite vidoes using AOL's Truveo Video Search Engine,with 5 addtional User Preferences and 10 International languages auto support enabled based on browser settings.So now you can Search/Suche/Recherche/Busqueda and more !!"
height="360"
width="240"
screenshot="http://vaish.rajan.googlepages.com/truveo_en.JPG"
thumbnail="http://vaish.rajan.googlepages.com/truveo_en_thumb.JPG"
scrolling="true"
author="Rajan Vaish"
author_affiliation=""
author_email="vaish.rajan@gmail.com"
author_location="Lucknow,India"
author_link=""
author_photo=""
author_aboutme="http://linkedin.com/in/rajanvaish"
author_quote="Think Big,To Grow Big">
<Require feature="analytics" />
<Locale messages="http://vaish.rajan.googlepages.com/ALL_ALL.xml"/>
<Locale lang="fr" messages="http://vaish.rajan.googlepages.com/fr_ALL.xml"/>
<Locale lang="de" messages="http://vaish.rajan.googlepages.com/de_ALL.xml"/>
<Locale lang="es" messages="http://vaish.rajan.googlepages.com/es_ALL.xml"/>
<Locale lang="it" messages="http://vaish.rajan.googlepages.com/it_ALL.xml"/>
<Locale lang="nl" messages="http://vaish.rajan.googlepages.com/nl_ALL.xml"/>
<Locale lang="sv" messages="http://vaish.rajan.googlepages.com/sv_ALL.xml"/>
<Locale lang="pl" messages="http://vaish.rajan.googlepages.com/pl_ALL.xml"/>
<Locale lang="no" messages="http://vaish.rajan.googlepages.com/no_ALL.xml"/>
<Locale lang="fi" messages="http://vaish.rajan.googlepages.com/fi_ALL.xml"/>
</ModulePrefs>
<Content type="html">

<![CDATA[
<script type="text/javascript" src="http://xml.truveo.com/TruveoVideoSearchAPIv3.js">
</script>
<script type="text/javascript">


var TVS = null;
var querychan=' ';
var querylang=' ';
var querycat=' ';
var queryrun=' ';
var querysort=' ';

function addchan(chanval) {
querychan=chanval;
}
function addlang(langval) {
querylang=langval;
}
function addcat(catval) {
querycat=catval;
}
function addrun(runval) {
queryrun=runval;
}
function addsort(sortval) {
querysort=sortval;
}

function nextPage() {
document.getElementById("TitleDiv").innerHTML = ' Loading...';
document.getElementById("ResultsDiv").innerHTML = '';
scroll(0,0);
TVS.nextPage();
}

function previousPage() {
document.getElementById("TitleDiv").innerHTML = ' Loading...';
document.getElementById("ResultsDiv").innerHTML = '';
scroll(0,0);
TVS.previousPage();
}




function getVideos(query) {
query=query + ' ' + querychan + ' '+ querylang + ' ' + querycat + ' ' + queryrun + ' ' + querysort ;
TVS.getVideos(query);
}


function playVideo(videoUrl, id) {
window.open(videoUrl, '', 'width=500,height=500,location=no,menubar=no,resizable=yes,scrollbars=yes');
}


function handleUpdate(methodName) {
refreshResults(TVS);
}


function handleLoad(reloadStateFlag) {
getVideos('');
}


function handleError(errorCode, errorMessage) {
alert("ERROR: Code " + errorCode + "; " + errorMessage);
}


function refreshResults(TVS) {
var HTML1 = '';
if (TVS.VideoSet && TVS.VideoSet.Video) {
var VideoSet = TVS.VideoSet;
var cellsPerRow = 1;
var rows = 20;
HTML1 += '<table style="width: 100%; margin: 0 0 0 0; border: 0px; border-style: none; border-collapse: collapse; vertical-align: top;">';
for (var j=0; j < rows; j++) {
HTML1 += '<tr>';
for (var k=0; k < cellsPerRow; k++) {
var i = (j * cellsPerRow) + k;
HTML1 += '<td align="center" valign="top" style="padding: 12px 4px 12px 4px;">';
if (i >= VideoSet.Video.length) { HTML1 += '&nbsp;'; }
else {
var theVideo = VideoSet.Video[i];
if (theVideo) {
HTML1 += '<div style="width: 130px;text-align:center; font-family: Arial, sans-serif; font-size: 9pt;">';
HTML1 += '<a href="javascript:playVideo(\''+theVideo.videoUrl+'\','+theVideo.id+'); void(0);"><img src="'+theVideo.thumbnailUrl+'" style="width: 75px; height: 56px; border: 2px solid #6600CC;" alt="click to play video"/></a>';
HTML1 += '<div><a href="javascript:playVideo(\''+theVideo.videoUrl+'\','+theVideo.id+'); void(0);">'+theVideo.title+'</a></div>';
}
}
HTML1 += '</td>';
}
HTML1 += '</tr>';
}
HTML1 += '</table>';
document.getElementById("ResultsDiv").innerHTML = HTML1;
document.getElementById("TitleDiv").innerHTML = ' ' + TVS.VideoSet.title;
var HTML2 = '';
HTML2 += '<table style="width: 100%; margin: 0 0 0 0; border: 0px; border-style: none; border-collapse: collapse;" cellpadding="0">';
HTML2 += '<tr>';
HTML2 += '<td style="text-align: left;">';
if (TVS.hasPreviousPage()) { HTML2 += '<a href="javascript:previousPage(); void(0);">&lt;&lt;previous</a>'; } else { HTML2 += '&nbsp;'; }
HTML2 += '</td>';
HTML2 += '<td style="text-align: right;">';
if (TVS.hasNextPage()) { HTML2 += '<a href="javascript:nextPage(); void(0);">next&gt;&gt;</a>'; } else { HTML2 += '&nbsp;'; }
HTML2 += '</td>';
HTML2 += '</tr>';
HTML2 += '</table>';
document.getElementById("FooterDiv").innerHTML = HTML2;
}
else {
document.getElementById("ResultsDiv").innerHTML = '&nbsp;';
document.getElementById("TitleDiv").innerHTML = '__MSG_default__';
}

}


function VSLoad() {
TVS = new TruveoVideoSearch('2f2fdbac5b8841b70');
TVS.results = 20;
TVS.attachEvent('onerror', 'handleError(errorCode, errorMessage);');
TVS.attachEvent('onupdate', 'handleUpdate(methodName);');
TVS.attachEvent('onload', 'handleLoad(reloadStateFlag);');
TVS.initialize();
getVideos("");
}

_IG_RegisterOnloadHandler(VSLoad);

</script>
<body background="http://vaish.rajan.googlepages.com/worldbac.JPG" >
<div id="bodyDiv">
<br>
<div id="logo" align="center" ><img src="http://vaish.rajan.googlepages.com/trulogo.JPG" /></div>

<form name="searchForm" onsubmit="javascript:getVideos(document.getElementById('searchBox').value); return(false);" style="margin:0;">
<div style="width:100%; text-align:center;">
<input type="text" name="searchBox" id="searchBox" size="20" value="" />
<br />
<select name="Channels" onChange="addchan(this.options[this.selectedIndex].value);" >
<option value="channel" selected="selected">__MSG_channel__</option>
<option value="channel:MSN">__MSG_msn__</option>
<option value="channel:YouTube">__MSG_youtube__</option>
<option value="channel:Google Video" >__MSG_googlevideo__</option>
<option value="channel:MYSPACE">__MSG_myspace__</option>
<option value="channel:AOL">__MSG_aol__</option>
<option value="channel:Yahoo!">__MSG_yahoo__</option>
<option value="channel:BBC">__MSG_bbc__</option>
<option value="channel:FOX">__MSG_fox__</option>
<option value="channel:CNN">__MSG_cnn__</option>
<option value="channel:USA TODAY">__MSG_usatoday__</option>
</select>
<br>
<select name="Language" onChange="addlang(this.options[this.selectedIndex].value);">
<option value="language" selected="selected">__MSG_language__</option>
<option value="language:en">__MSG_english__</option>
<option value="language:es">__MSG_spanish__</option>
<option value="language:fr">__MSG_french__</option>
<option value="language:de" >__MSG_german__</option>
</select>
<br>
<select name="Category" onChange="addcat(this.options[this.selectedIndex].value);">
<option value="category" selected="selected">__MSG_category__</option>
<option value="category:news">__MSG_news__</option>
<option value="category:sports">__MSG_sports__</option>
<option value="category:entertainment">__MSG_entertainment__</option>
<option value="category:business" >__MSG_business__</option>
<option value="category:technology OR category:science" >__MSG_tands__</option>
<option value="category:comedy" >__MSG_comedy__</option>
<option value="category:movies OR category:music" >__MSG_mandm__</option>
<option value="category:health & fitness" >__MSG_handf__</option>
<option value="category:pets & animals" >__MSG_panda__</option>
</select>
<br>
<select name="RunTime" onChange="addrun(this.options[this.selectedIndex].value);">
<option value="runtime" selected="selected">__MSG_runtime__</option>
<option value="runtime:<1">__MSG_lessone__</option>
<option value="runtime:<5">__MSG_lessfive__</option>
<option value="runtime:>5">__MSG_morefive__</option>
</select>
<br>
<select name="Sorter" onChange="addsort(this.options[this.selectedIndex].value);">
<option value="sort" selected="selected">__MSG_sort__</option>
<option value="sort:mostRecent">__MSG_mrecent__</option>
<option value="sort:mostPopular">__MSG_mpop__</option>
<option value="sort:highestRated">__MSG_hrated__</option>
<option value="sort:mostRelevant" >__MSG_mrelv__</option>
</select>
<br>
<input type="submit" name="searchButton" id="searchBox" value="__MSG_search__" />
<input name=B2 type=reset value="__MSG_reset__">
</div>
</form>
<br />
<div id="ResultsDiv">&nbsp;</div>
<div id="TitleDiv">&nbsp;</div>
<div id="FooterDiv">&nbsp;</div>
</div>
</body>

]]>
</Content>
</Module>
